Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d5253e0766c46f85fe597f82eeb7ed824194c62
      
https://github.com/WebKit/WebKit/commit/9d5253e0766c46f85fe597f82eeb7ed824194c62
  Author: Alex Christensen <achristen...@apple.com>
  Date:   2024-06-03 (Mon, 03 Jun 2024)

  Changed paths:
    M Source/WebKit/UIProcess/RemotePageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Ignore WebPageProxy::didFinishLoadForFrame message if a load 
has started in another process
https://bugs.webkit.org/show_bug.cgi?id=275084
rdar://129192839

Reviewed by Charlie Wolfe.

When starting a provisional load in one process then cancelling it to start a 
provisional load in a different process,
site isolation introduces an unavoidable race condition between the 
WebPage::DestroyProvisionalFrame message going to
the process that had the first provisional load and the 
WebPageProxy::DidFinishLoadForFrame message that may be coming
from that same process at the same time.  To solve this, the UI process should 
ignore such messages coming from a process
that is not the most recent process it has started a provisional load in.

A similar message ignoring exists in the 
WebPageProxy::didStartProvisionalLoadForFrameShared message receiver for the 
same reason.

This is the cause of the flaky asserts in debug builds when running the test 
http/tests/site-isolation/window-open-with-name-cross-site.html
I spent several hours today learning that it's basically impossible to hit this 
condition reliably in an API test, so I removed
my note to add such a test.  We already have a test that is flaky when this 
change is not made.

Somewhat related, I changed RemotePageProxy::didCommitLoadForFrame to call 
WebPageProxy::didCommitLoadForFrame instead of
WebFrameProxy::commitProvisionalFrame to keep the purity of RemotePageProxy as 
a message forwarder instead of a decision
maker.

* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::didCommitLoadForFrame):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFinishLoadForFrame):
* Source/WebKit/UIProcess/WebPageProxy.h:

Canonical link: https://commits.webkit.org/279684@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to