Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fa35998e9caf2c45f333bdd7bfff310af2c06e56
      
https://github.com/WebKit/WebKit/commit/fa35998e9caf2c45f333bdd7bfff310af2c06e56
  Author: Alex Christensen <[email protected]>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/iframe-process-termination-expected.html
    A LayoutTests/http/tests/site-isolation/iframe-process-termination.html
    A 
LayoutTests/http/tests/site-isolation/resources/iframe-terminate-process-when-loaded.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl
    M Source/WebKit/UIProcess/RemotePageProxy.cpp
    M Source/WebKit/UIProcess/RemotePageProxy.h
    M Source/WebKit/UIProcess/WebFrameProxy.cpp
    M Source/WebKit/UIProcess/WebFrameProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.cpp

  Log Message:
  -----------
  Isolated iframes that crash during load should not delay load event of parent
https://bugs.webkit.org/show_bug.cgi?id=267089

Reviewed by Pascoe.

To accomplish this, I need to have each RemotePageProxy be informed when a 
process crashes,
and have each RemotePageProxy keep track of which WebFrameProxies are using it. 
 Then, we
need to send Messages::WebPage::DidFinishLoadInAnotherProcess to the parent 
process when a child
crashes if it has not already been sent.

I removed WebFrameProxy's m_webPageID because it was not used and not updated 
correctly when
the process of a frame changes, which likely causes a different PageIdentifier 
to be used in
the new process.

I moved the sending of the DidFinishLoadInAnotherProcess message to a shared 
function to reduce
duplicate code.

I removed the clearing of m_remotePageProxy in 
WebFrameProxy::prepareForProvisionalNavigationInProcess
because it would've needed some updating of frame content management with an 
additional removeFrame
call, but that is actually the wrong place to be clearing the RemotePageProxy.
WebFrameProxy::commitProvisionalFrame is the right time to be updating that.

* 
LayoutTests/http/tests/site-isolation/iframe-process-termination-expected.html: 
Added.
* LayoutTests/http/tests/site-isolation/iframe-process-termination.html: Added.
* 
LayoutTests/http/tests/site-isolation/resources/iframe-terminate-process-when-loaded.html:
 Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::terminateWebContentProcess):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::processDidTerminate):
(WebKit::RemotePageProxy::addFrame):
(WebKit::RemotePageProxy::removeFrame):
* Source/WebKit/UIProcess/RemotePageProxy.h:
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::WebFrameProxy):
(WebKit::WebFrameProxy::prepareForProvisionalNavigationInProcess):
(WebKit::WebFrameProxy::commitProvisionalFrame):
(WebKit::WebFrameProxy::remoteProcessDidTerminate):
(WebKit::WebFrameProxy::notifyParentOfLoadCompletion):
(WebKit::WebFrameProxy::webPageIDInCurrentProcess):
* Source/WebKit/UIProcess/WebFrameProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didFinishLoadForFrame):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to