Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d58d8ad4b6002b5a2d24996c21a2ed24901301f5
https://github.com/WebKit/WebKit/commit/d58d8ad4b6002b5a2d24996c21a2ed24901301f5
Author: Cole Carley <[email protected]>
Date: 2026-05-08 (Fri, 08 May 2026)
Changed paths:
M LayoutTests/platform/ios-site-isolation/TestExpectations
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/page/Page.cpp
M Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Log Message:
-----------
[Site Isolation]
imported/w3c/web-platform-tests/clear-site-data/executionContexts.sub.html fails
https://bugs.webkit.org/show_bug.cgi?id=314354
rdar://176503846
Reviewed by Ryosuke Niwa.
When a response carries Clear-Site-Data: "executionContexts", WebKit is
supposed to reload every execution context matching the response's origin
(gated behind the ClearSiteDataExecutionContextsSupportEnabled feature).
This does not work in site isolation cross-origin subframes for two reasons:
1. NetworkProcessProxy::reloadExecutionContextsForOrigin only broadcast
the WebProcess message to processes registered with the
WebsiteDataStore. That set is populated from
WebProcessProxy::updateRegistrationWithDataStore() and requires
pageCount() > 0, so subframe-only WebProcesses were never included.
I fixed this by walking each page's BrowsingContextGroup via
forEachRemotePage to collect subframe-hosting processes, that
were previously missed before sending.
2. Page::reloadExecutionContextsForOrigin bailed out if the page's main
frame wasn't a LocalFrame. In the iframe's process the main frame is a
RemoteFrame, so the early return ran before the iterator could reach
the local iframe.
I fixed this by using Page::mainFrameOrigin(), which reads the
DocumentSyncData instead of relying on the main frame being a LocalFrame.
Note that NetworkProcessProxy::deleteWebsiteDataInWebProcessesForOrigin,
which has a similar bug, and should be investigated in a follow up.
* LayoutTests/platform/ios-site-isolation/TestExpectations:
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::reloadExecutionContextsForOrigin const):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::deleteWebsiteDataInWebProcessesForOrigin):
(WebKit::NetworkProcessProxy::reloadExecutionContextsForOrigin):
Canonical link: https://commits.webkit.org/312891@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications