[webkit-changes] [WebKit/WebKit] 9eadb9: Remove SubframePageProxy and associated processes ...

Alex Christensen noreply at github.com
Mon May 22 20:46:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9eadb9b6c14f00e9d345a22ea725b74fc36b17a4
      https://github.com/WebKit/WebKit/commit/9eadb9b6c14f00e9d345a22ea725b74fc36b17a4
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-05-22 (Mon, 22 May 2023)

  Changed paths:
    M Source/WebKit/UIProcess/SubframePageProxy.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/WebPageProxyInternals.h
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  Remove SubframePageProxy and associated processes when no longer used
https://bugs.webkit.org/show_bug.cgi?id=257166
rdar://105024979

Reviewed by Chris Dumez.

A SubframePageProxy needs to keep track of how many frames are using it,
and when that number hits zero it needs to be deleted.  This sounds a lot
like reference counting.  Make it RefCounted and change its ownership to
the WebFrameProxy.  The WebPageProxy still needs to keep a map of RegistrableDomain
to SubframePageProxy to be able to reuse the same process for multiple iframes,
but this map can keep weak references.

* Source/WebKit/UIProcess/SubframePageProxy.h:
(WebKit::SubframePageProxy::create):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::commitProvisionalFrame):
(WebKit::WebFrameProxy::setSubframePageProxy):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updateRemoteFrameSize):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::addSubframePageProxy):
(WebKit::WebPageProxy::removeSubpageFrameProxyIfUnused):
(WebKit::WebPageProxy::subpageFrameProxyForRegistrableDomain const):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxyInternals.h:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::TEST):

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




More information about the webkit-changes mailing list