Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0b4586493fd3b8acaf95b0550ee1d37faa031a3c
https://github.com/WebKit/WebKit/commit/0b4586493fd3b8acaf95b0550ee1d37faa031a3c
Author: Anuj Panta <[email protected]>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M Source/WebCore/inspector/InspectorInstrumentation.cpp
M Source/WebCore/inspector/agents/InspectorNetworkAgent.h
M Source/WebCore/inspector/hooks/NetworkAgentInstrumentation.h
M Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp
M Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp
M Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.h
Log Message:
-----------
Web Inspector: network interception hooks bypass Site Isolation; set up the
proxy dispatch path
https://bugs.webkit.org/show_bug.cgi?id=324478
rdar://187716215
Reviewed by Qianlang Chen.
Add the five interception hooks to the NetworkAgentInstrumentation contract and
dispatch them to the network proxy slot when the in-process agent is absent,
which is the case under Site Isolation since PageNetworkAgent::enable() returns
before registering. The hooks previously consulted only the in-process slot, so
they resolved through a null agent and declined every load. Unlike the reporting
hooks, which fan out to both slots, these dispatch to a single agent because the
handler that resumes a paused load is move-only; the two void hooks use else if
to make that structural, matching didCommitLoad. Implement the contract in
FrameNetworkAgentProxy by declining interception, and resume the load unmodified
in the two hooks that take a completion handler rather than dropping it. Change
ProxyingNetworkAgent's resolution commands to report the same missing-intercept
errors as the single-process agent; leave the configuration commands accepting
and discarding their arguments, since NetworkManager replays saved Local
Overrides through addInterception on every target setup. No behavior change to
load interception in either mode.
* Source/WebCore/inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willInterceptImpl):
(WebCore::InspectorInstrumentation::shouldInterceptRequestImpl):
(WebCore::InspectorInstrumentation::shouldInterceptResponseImpl):
(WebCore::InspectorInstrumentation::interceptRequestImpl):
(WebCore::InspectorInstrumentation::interceptResponseImpl):
* Source/WebCore/inspector/agents/InspectorNetworkAgent.h:
* Source/WebCore/inspector/hooks/NetworkAgentInstrumentation.h:
* Source/WebKit/UIProcess/Inspector/Agents/ProxyingNetworkAgent.cpp:
(Inspector::ProxyingNetworkAgent::interceptContinue):
(Inspector::ProxyingNetworkAgent::interceptWithRequest):
(Inspector::ProxyingNetworkAgent::interceptWithResponse):
(Inspector::ProxyingNetworkAgent::interceptRequestWithResponse):
(Inspector::ProxyingNetworkAgent::interceptRequestWithError):
* Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp:
(WebKit::FrameNetworkAgentProxy::willIntercept):
(WebKit::FrameNetworkAgentProxy::shouldInterceptRequest):
(WebKit::FrameNetworkAgentProxy::shouldInterceptResponse):
(WebKit::FrameNetworkAgentProxy::interceptRequest):
(WebKit::FrameNetworkAgentProxy::interceptResponse):
* Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.h:
Canonical link: https://commits.webkit.org/322522@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications