[webkit-changes] [WebKit/WebKit] dd1da9: [Site Isolation] Prepare to move ProvisionalFrameP...

Alex Christensen noreply at github.com
Fri May 24 13:43:04 PDT 2024


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

  Changed paths:
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebKit/UIProcess/API/APINavigation.cpp
    M Source/WebKit/UIProcess/API/APINavigation.h
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.h
    M Source/WebKit/UIProcess/Model/ModelProcessProxy.h
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
    M Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp
    M Source/WebKit/UIProcess/ProvisionalFrameProxy.h
    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 Source/WebKit/UIProcess/WebProcessProxy.h
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp

  Log Message:
  -----------
  [Site Isolation] Prepare to move ProvisionalFrameProxy ownership from WebFrameProxy to API::Navigation
https://bugs.webkit.org/show_bug.cgi?id=274604
rdar://128626098

Reviewed by Charlie Wolfe.

In order to fix the FIXME comment at the bottom of the SiteIsolation.CancelProvisionalLoad API test,
we need to be able to be cancelling a provisional load in a process at the same time as we are starting
a new provisional load in that same process.  In order to make that work, the ProvisionalFrameProxy
can't be destroyed when the first provisional load fails.  We will need to move the ProvisionalFrameProxy
ownership to the Navigation, and introduce the possibility of multiple Navigation objects keeping it
alive, so it needs to be RefCounted instead of owned by a unique_ptr.  We also need the message
WebPage::DestroyProvisionalFrame to be sent from the UI process instead of called directly by the web
process because at the time a provisional load failure is being dispatched from the web process,
the web process doesn't know whether the provisional frame should be destroyed.  I set
loadParameters.navigationID in a few more places so we can get the Navigation object in more places.
I remove the use of WebFrameProxy::provisionalFrame in WebPageProxy::decidePolicyForResponse in favor
of getting the WebProcessProxy from the IPC::Connection, which requires adding a way to get a
WebProcessProxy from an AuxiliaryProcessProxy.  With site isolation on, we will need to set up navigation
identifiers for all frame loads instead of just the main frame, so I do that behind a siteIsolationEnabled
check.  WebFrameProxy::prepareForProvisionalLoadInProcess will need to modify the navigation by setting
its ProvisionalFrameProxy, so I make it non-const.

This is all the set-up I can do without really changing behavior.  An upcoming PR will do the rest of the
more invasive changes to get that test addition to work completely.

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::updateRequestAndAddExtraFields):
* Source/WebKit/UIProcess/API/APINavigation.cpp:
(API::Navigation::setProvisionalFrame):
* Source/WebKit/UIProcess/API/APINavigation.h:
(API::Navigation::provisionalFrame):
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.h:
* Source/WebKit/UIProcess/GPU/GPUProcessProxy.h:
* Source/WebKit/UIProcess/Model/ModelProcessProxy.h:
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:
* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::create):
(WebKit::ProvisionalFrameProxy::~ProvisionalFrameProxy):
(WebKit::ProvisionalFrameProxy::takeFrameProcess):
* Source/WebKit/UIProcess/ProvisionalFrameProxy.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::takeProvisionalFrame):
(WebKit::WebFrameProxy::prepareForProvisionalLoadInProcess):
(WebKit::WebFrameProxy::commitProvisionalFrame):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::decidePolicyForResponse):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessProxy.h:
(isType):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::dispatchDidFailProvisionalLoad):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createDocumentLoader):

Canonical link: https://commits.webkit.org/279291@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