Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cd11ac52dbc429a70636319cf29fde369abc3164
https://github.com/WebKit/WebKit/commit/cd11ac52dbc429a70636319cf29fde369abc3164
Author: Sihui Liu <[email protected]>
Date: 2026-05-19 (Tue, 19 May 2026)
Changed paths:
A
LayoutTests/http/tests/security/cross-origin-iframe-fetch-after-crash-expected.txt
A LayoutTests/http/tests/security/cross-origin-iframe-fetch-after-crash.html
A
LayoutTests/http/tests/security/resources/cross-origin-iframe-fetch-after-crash-iframe.html
M Source/WebKit/NetworkProcess/NetworkProcess.cpp
M Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h
M
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in
M Source/WebKit/Shared/NetworkProcessConnectionParameters.h
M Source/WebKit/Shared/NetworkProcessConnectionParameters.serialization.in
M Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
M Source/WebKit/UIProcess/WebProcessProxy.cpp
M Source/WebKit/UIProcess/WebProcessProxy.h
Log Message:
-----------
[Site Isolation] NetworkProcess::m_allowedFirstPartiesForCookies not restored
for subframe processes after crash
https://bugs.webkit.org/show_bug.cgi?id=314951
rdar://177247707
Reviewed by Charlie Wolfe.
Under Site Isolation, when the network process crashes and restarts,
cross-origin subframe processes might get killed
for failing allowsFirstPartyForCookies message checkes in network process. The
cause is the new network process only has
cookies access information for the main frame process -- the existing
implementation creates new network process with
WebProcessProxy::allowedFirstPartiesForCookies(), which only checks page's main
frame process and only gets the current
url of page.
To fix this, store allowedFirstPartiesForCookies on each WebProcessProxy (which
outlives network process crashes) and
send it via NetworkProcessConnectionParameters when the web process reconnects
to the network process. Remove the old
NetworkProcessCreationParameters path as it is no longer needed with the new
implementation.
Test: http/tests/security/cross-origin-iframe-fetch-after-crash.html
*
LayoutTests/http/tests/security/cross-origin-iframe-fetch-after-crash-expected.txt:
Added.
* LayoutTests/http/tests/security/cross-origin-iframe-fetch-after-crash.html:
Added.
*
LayoutTests/http/tests/security/resources/cross-origin-iframe-fetch-after-crash-iframe.html:
Added.
* Source/WebKit/NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::removeNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addAllowedFirstPartyForCookies):
(WebKit::NetworkProcess::allowsFirstPartyForCookies):
* Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h:
*
Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in:
* Source/WebKit/Shared/NetworkProcessConnectionParameters.h:
* Source/WebKit/Shared/NetworkProcessConnectionParameters.serialization.in:
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
(WebKit::NetworkProcessProxy::addAllowedFirstPartyForCookies):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addAllowedFirstPartyForCookies):
(WebKit::WebProcessProxy::allowedFirstPartiesForCookies): Deleted.
* Source/WebKit/UIProcess/WebProcessProxy.h:
Canonical link: https://commits.webkit.org/313490@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications