[webkit-changes] [WebKit/WebKit] bdfea5: [Site Isolation] Allow navigating to a domain whil...

Alex Christensen noreply at github.com
Fri May 31 17:08:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bdfea5e813fd2c0bcbc53a2c7957292d3d29f8fa
      https://github.com/WebKit/WebKit/commit/bdfea5e813fd2c0bcbc53a2c7957292d3d29f8fa
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-05-31 (Fri, 31 May 2024)

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

  Log Message:
  -----------
  [Site Isolation] Allow navigating to a domain while a provisional navigation is pending to that same domain
https://bugs.webkit.org/show_bug.cgi?id=274876
rdar://128979060

Reviewed by Charlie Wolfe.

To get this to work and make the UI process frame management more elegant, I tie the
WebPage::CreateProvisionalFrame and WebPage::DestroyProvisionalFrame messages to the lifetime
of the ProvisionalFrameProxy object.  I make sure to destroy a ProvisionalFrameProxy before
creating a new one so the DestroyProvisionalFrame message is sent before the CreateProvisionalFrame
message.  This simplifies a lot of things, but there is an unavoidable race condition when you
start a provisional load in one process then, before it commits, start a provisional load in
another process: the UI process may receive the WebPageProxy::didStartProvisionalLoadForFrame
message from the second process before the first process has notified the UI process of the
first provisional load failure.  When this happens, the UI process needs to update the
FrameLoadState and notify the navigation client, which will require a bit more refactoring
and can be done separately.

* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::ProvisionalFrameProxy):
(WebKit::ProvisionalFrameProxy::~ProvisionalFrameProxy):
(WebKit::ProvisionalFrameProxy::process const):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::prepareForProvisionalLoadInProcess):
* Source/WebKit/UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::layerHostingContextIdentifier const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::sendToWebPageInProcess): Deleted.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::checkFrameTreesInProcesses):
(TestWebKitAPI::TEST(SiteIsolation, CancelProvisionalLoad)):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list