[webkit-changes] [WebKit/WebKit] 4c8182: WebFrame and WebFrameProxy should send messages th...

Alex Christensen noreply at github.com
Tue May 9 17:46:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4c8182f7f87474c644e5cf5eaf01207778b150ff
      https://github.com/WebKit/WebKit/commit/4c8182f7f87474c644e5cf5eaf01207778b150ff
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M Source/WebKit/CMakeLists.txt
    M Source/WebKit/DerivedSources.make
    M Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.h
    R Source/WebKit/UIProcess/WebFrameProxy.messages.in
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.messages.in
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
    M Source/WebKit/WebProcess/WebPage/WebFrame.h
    R Source/WebKit/WebProcess/WebPage/WebFrame.messages.in
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in

  Log Message:
  -----------
  WebFrame and WebFrameProxy should send messages through WebPage and WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=256558
rdar://109120954

Reviewed by J Pascoe.

A few months ago I optimistically made them MessageSenders and MessageReceivers
thinking it would make the code nicer.  It turns out to have been the cause of
several issues.  First, a WebFrameProxy's first navigation message is sometimes
received before its creation message, so that can't be migrated to using
WebFrameProxy as a message receiver.  Second, the destination identifier of all
other IPC destinations is 64 bits, but with site isolation it needs to be 128 bits
for WebFrameProxy.  After several attempts at making that possible without wasting
bits for all the other messages, I realized that any solution to that problem will
be equivalent to this: sending a FrameIdentfier as a message parameter and using
it to look up the frame.

It turns out, I didn't need to introduce that many WebFrame/WebFrameProxy messages,
so this doesn't make the code too much messier.

* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/UIProcess/ProvisionalFrameProxy.cpp:
(WebKit::ProvisionalFrameProxy::ProvisionalFrameProxy):
(WebKit::ProvisionalFrameProxy::~ProvisionalFrameProxy):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::WebFrameProxy):
(WebKit::WebFrameProxy::~WebFrameProxy):
(WebKit::WebFrameProxy::commitProvisionalFrame):
(WebKit::WebFrameProxy::getFrameInfo):
(WebKit::WebFrameProxy::messageSenderConnection const): Deleted.
(WebKit::WebFrameProxy::messageSenderDestinationID const): Deleted.
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebFrameProxy.messages.in: Removed.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCreateSubframe):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::willSubmitForm):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSubframe):
(WebKit::WebFrame::WebFrame):
(WebKit::WebFrame::~WebFrame):
(WebKit::WebFrame::updateRemoteFrameSize):
(WebKit::WebFrame::messageSenderConnection const): Deleted.
(WebKit::WebFrame::messageSenderDestinationID const): Deleted.
* Source/WebKit/WebProcess/WebPage/WebFrame.h:
* Source/WebKit/WebProcess/WebPage/WebFrame.messages.in: Removed.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getFrameInfo):
(WebKit::WebPage::continueWillSubmitForm):
(WebKit::WebPage::didCommitLoadInAnotherProcess):
(WebKit::WebPage::didFinishLoadInAnotherProcess):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:

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




More information about the webkit-changes mailing list