Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6ff73fdea8f3049ff7b6df84617e2ea2cc712d27
https://github.com/WebKit/WebKit/commit/6ff73fdea8f3049ff7b6df84617e2ea2cc712d27
Author: Ronan Turner <[email protected]>
Date: 2026-10-12 (Mon, 12 Oct 2026)
Changed paths:
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M TestExpectations/apitests
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EnhancedSecurityPolicies.mm
Log Message:
-----------
[Site Isolation] Cancelling a provisional main frame load leaves a stale
provisional frame in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=316807
rdar://179255404
Reviewed by Sihui Liu.
When a new navigation replaces a pending cross-process main frame load,
ProvisionalPageProxy::cancel only simulates a didFailProvisionalLoadForFrame
in the UI process.
With site isolation, the provisional page is kept as a remote page and the
next provisional load in the same process takes that WebPage over. The
WebContent process was never told the earlier load was cancelled, so its
provisional LocalFrame was still alive, and creating the new provisional
frame produced a second LocalFrame with the same FrameIdentifier.
This manifests as a flakey test in:
* EnhancedSecurityPolicies.OpenerThenSelfNavigationWithSiteIsolation
This test hits the path only when the opener's self-navigation hasn't
committed before the popup navigates the opener 500ms later.
Fix this by sending WebFrame::DestroyProvisionalFrame to the provisional
process when cancelling under site isolation. WebFrame::destroyProvisionalFrame
does nothing if there is no provisional frame.
Introduced a new test which makes this race deterministic by never responding
to the opener's self-navigation. Prior to this change, this test hits the
ASSERT on all runs.
Tests:
EnhancedSecurityPolicies.OpenerNavigatedWhileSelfNavigationIsProvisionalWithSiteIsolation
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::cancel):
* TestExpectations/apitests: Un-garden
EnhancedSecurityPolicies.OpenerThenSelfNavigationWithSiteIsolation.
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EnhancedSecurityPolicies.mm:
(runOpenerNavigatedWhileSelfNavigationIsProvisional):
Canonical link: https://commits.webkit.org/323497@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications