Skip to content

Commit

Permalink
Send PolicyAction::LoadWillContinueInAnotherProcess if the frame proc…
Browse files Browse the repository at this point in the history
…ess is changing

https://bugs.webkit.org/show_bug.cgi?id=259863

Reviewed by Tim Horton.

266528@main exposed a bug in the site isolation implementation.
We were sending PolicyAction::LoadWillContinueInAnotherProcess if the load was continuing in a process
other than the initiator, and we should have been sending it if the load was continuing in a process
that is different than the process the frame is in.

This fixes two API tests that were asserting in debug builds:
TestWebKitAPI.SiteIsolation.NavigatingCrossOriginIframeToSameOrigin and
TestWebKitAPI.SiteIsolation.ChildNavigatingToMainFrameDomain

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationPolicyDecision):

Canonical link: https://commits.webkit.org/266618@main
  • Loading branch information
achristensen07 committed Aug 5, 2023
1 parent 5e15a2d commit b3b9f13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebKit/UIProcess/WebPageProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3986,7 +3986,7 @@ void WebPageProxy::receivedNavigationPolicyDecision(WebProcessProxy& processNavi

const bool navigationChangesFrameProcess = processNavigatingTo.ptr() != processNavigatingFrom.ptr();
const bool loadContinuingInNonInitiatingProcess = processInitiatingNavigation.ptr() != processNavigatingTo.ptr();
if (loadContinuingInNonInitiatingProcess) {
if (navigationChangesFrameProcess) {
policyAction = PolicyAction::LoadWillContinueInAnotherProcess;
WEBPAGEPROXY_RELEASE_LOG(ProcessSwapping, "decidePolicyForNavigationAction, swapping process %i with process %i for navigation, reason=%" PUBLIC_LOG_STRING, processID(), processNavigatingTo->processID(), reason.characters());
LOG(ProcessSwapping, "(ProcessSwapping) Switching from process %i to new process (%i) for navigation %" PRIu64 " '%s'", processID(), processNavigatingTo->processID(), navigation->navigationID(), navigation->loggingString());
Expand Down

0 comments on commit b3b9f13

Please sign in to comment.