REGRESSION: WebProcess is terminated when all Safari windows are closed.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 May 2013 21:34:26 +0000 (21:34 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 May 2013 21:34:26 +0000 (21:34 +0000)
<rdar://problem/13990901>
<http://webkit.org/b/116766>

Reviewed by Alexey Proskuryakov.

When closing the last page, only disconnect the web process if we're using a network process.
Otherwise there might be session state in the web process getting lost.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@150691 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebProcessProxy.cpp

index 9bc2b1e..91d0b9b 100644 (file)
@@ -1,3 +1,17 @@
+2013-05-25  Andreas Kling  <akling@apple.com>
+
+        REGRESSION: WebProcess is terminated when all Safari windows are closed.
+        <rdar://problem/13990901>
+        <http://webkit.org/b/116766>
+
+        Reviewed by Alexey Proskuryakov.
+
+        When closing the last page, only disconnect the web process if we're using a network process.
+        Otherwise there might be session state in the web process getting lost.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::removeWebPage):
+
 2013-05-25  Santosh Mahto  <santosh.ma@samsung.com>
 
         WebFrameProxy::didFailLoad clears frame title for no apparent reason
index 35e4cd4..f4c2a73 100644 (file)
@@ -201,7 +201,8 @@ void WebProcessProxy::removeWebPage(uint64_t pageID)
 #endif
 
     // If this was the last WebPage open in that web process, and we have no other reason to keep it alive, let it go.
-    if (canTerminateChildProcess()) {
+    // We only allow this when using a network process, as otherwise the WebProcess needs to preserve its session state.
+    if (m_context->usesNetworkProcess() && canTerminateChildProcess()) {
         abortProcessLaunchIfNeeded();
         disconnect();
     }