Title: [243562] trunk/Source/WebKit
Revision
243562
Author
cdu...@apple.com
Date
2019-03-27 13:47:52 -0700 (Wed, 27 Mar 2019)

Log Message

[ iOS Sim ] REGRESSION (r242277) Layout Test http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.php is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=195425
<rdar://problem/48682403>

Reviewed by Alex Christensen.

When process-swapping on history navigation, we lookup the WebProcessProxy we'd like to use from the
process identifier that is saved on the WebBackForwardListItem, to try and load the item in the process
in which it was previously loaded. However, we were failing to check if the WebProcess in question was
still running so we could potentially try to use a process that's already exited.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (243561 => 243562)


--- trunk/Source/WebKit/ChangeLog	2019-03-27 20:29:45 UTC (rev 243561)
+++ trunk/Source/WebKit/ChangeLog	2019-03-27 20:47:52 UTC (rev 243562)
@@ -1,3 +1,19 @@
+2019-03-27  Chris Dumez  <cdu...@apple.com>
+
+        [ iOS Sim ] REGRESSION (r242277) Layout Test http/tests/cookies/same-site/lax-samesite-cookie-after-cross-site-history-load.php is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=195425
+        <rdar://problem/48682403>
+
+        Reviewed by Alex Christensen.
+
+        When process-swapping on history navigation, we lookup the WebProcessProxy we'd like to use from the
+        process identifier that is saved on the WebBackForwardListItem, to try and load the item in the process
+        in which it was previously loaded. However, we were failing to check if the WebProcess in question was
+        still running so we could potentially try to use a process that's already exited.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::processForNavigationInternal):
+
 2019-03-27  Zalan Bujtas  <za...@apple.com>
 
         [ContentChangeObserver] Always dispatch the synthetic click asynchronously

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (243561 => 243562)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2019-03-27 20:29:45 UTC (rev 243561)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2019-03-27 20:47:52 UTC (rev 243562)
@@ -2287,18 +2287,20 @@
         }
 
         if (RefPtr<WebProcessProxy> process = WebProcessProxy::processForIdentifier(targetItem->lastProcessIdentifier())) {
-            // FIXME: Architecturally we do not currently support multiple WebPage's with the same ID in a given WebProcess.
-            // In the case where this WebProcess has a SuspendedPageProxy for this WebPage, we can throw it away to support
-            // WebProcess re-use.
-            removeAllSuspendedPagesForPage(page, process.get());
+            if (process->state() != WebProcessProxy::State::Terminated) {
+                // FIXME: Architecturally we do not currently support multiple WebPage's with the same ID in a given WebProcess.
+                // In the case where this WebProcess has a SuspendedPageProxy for this WebPage, we can throw it away to support
+                // WebProcess re-use.
+                removeAllSuspendedPagesForPage(page, process.get());
 
-            // Make sure we remove the process from the cache if it is in there since we're about to use it.
-            if (process->isInProcessCache()) {
-                webProcessCache().removeProcess(*process, WebProcessCache::ShouldShutDownProcess::No);
-                ASSERT(!process->isInProcessCache());
+                // Make sure we remove the process from the cache if it is in there since we're about to use it.
+                if (process->isInProcessCache()) {
+                    webProcessCache().removeProcess(*process, WebProcessCache::ShouldShutDownProcess::No);
+                    ASSERT(!process->isInProcessCache());
+                }
+
+                return completionHandler(process.releaseNonNull(), nullptr, "Using target back/forward item's process"_s);
             }
-
-            return completionHandler(process.releaseNonNull(), nullptr, "Using target back/forward item's process"_s);
         }
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to