Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 301d6b2b21f7a0d391ce46704ab7b2e83332c90e
https://github.com/WebKit/WebKit/commit/301d6b2b21f7a0d391ce46704ab7b2e83332c90e
Author: Devin Rousso <[email protected]>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
A LayoutTests/http/tests/inspector/debugger/wasm/resources/named-module.py
A
LayoutTests/http/tests/inspector/debugger/wasm/resources/resource-worker.js
A LayoutTests/http/tests/inspector/debugger/wasm/script-url-expected.txt
A LayoutTests/http/tests/inspector/debugger/wasm/script-url.html
A
LayoutTests/http/tests/site-isolation/inspector/debugger/resources/wasm-frame.html
A
LayoutTests/http/tests/site-isolation/inspector/debugger/wasm-frame-placement-expected.txt
A
LayoutTests/http/tests/site-isolation/inspector/debugger/wasm-frame-placement.html
M LayoutTests/inspector/model/frame-extra-scripts-expected.txt
M LayoutTests/inspector/model/frame-extra-scripts.html
M LayoutTests/inspector/model/script-resource-relationship-expected.txt
M LayoutTests/inspector/model/script-resource-relationship.html
M Source/JavaScriptCore/debugger/Debugger.cpp
M Source/JavaScriptCore/debugger/Debugger.h
M Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
M Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h
M Source/JavaScriptCore/inspector/protocol/Debugger.json
M Source/JavaScriptCore/wasm/WasmModuleInformation.h
M Source/JavaScriptCore/wasm/WasmStreamingCompiler.cpp
M Source/JavaScriptCore/wasm/WasmStreamingCompiler.h
M Source/WebCore/Modules/fetch/FetchBodyOwner.cpp
M Source/WebCore/Modules/fetch/FetchBodyOwner.h
M Source/WebCore/Modules/fetch/FetchLoader.cpp
M Source/WebCore/Modules/fetch/FetchLoaderClient.h
M Source/WebCore/Modules/fetch/FetchResponse.cpp
M Source/WebCore/Modules/fetch/FetchResponse.h
M Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
M Source/WebCore/inspector/agents/WebDebuggerAgent.cpp
M Source/WebCore/inspector/agents/WebDebuggerAgent.h
M Source/WebCore/loader/WorkerThreadableLoader.cpp
M Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js
M Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js
M Source/WebInspectorUI/UserInterface/Models/Resource.js
M Source/WebInspectorUI/UserInterface/Models/Script.js
M Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js
M Source/WebInspectorUI/UserInterface/Views/GenericResourceContentView.js
M Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js
M Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js
M Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js
M Source/WebInspectorUI/UserInterface/Views/ScriptContentView.js
M Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js
M Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js
M Source/WebInspectorUI/UserInterface/Views/WorkerTreeElement.js
M Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp
M Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h
Log Message:
-----------
Web Inspector: associate WebAssembly module scripts with the resource that
fetched it
https://bugs.webkit.org/show_bug.cgi?id=320249
Reviewed by Yusuke Suzuki.
* Source/JavaScriptCore/wasm/WasmModuleInformation.h:
* Source/JavaScriptCore/wasm/WasmStreamingCompiler.h:
(JSC::Wasm::StreamingCompiler::create):
(JSC::Wasm::StreamingCompiler::StreamingCompiler):
* Source/JavaScriptCore/wasm/WasmStreamingCompiler.cpp:
(JSC::Wasm::StreamingCompiler::StreamingCompiler):
(JSC::Wasm::StreamingCompiler::create):
* Source/JavaScriptCore/debugger/Debugger.h:
* Source/JavaScriptCore/debugger/Debugger.cpp:
(JSC::Debugger::sourceParsed):
* Source/JavaScriptCore/inspector/protocol/Debugger.json:
* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h:
* Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::requestIdForScript): Added.
(Inspector::InspectorDebuggerAgent::didParseSource):
* Source/WebCore/inspector/agents/WebDebuggerAgent.h:
* Source/WebCore/inspector/agents/WebDebuggerAgent.cpp:
(WebCore::WebDebuggerAgent::requestIdForScript): Added.
* Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js:
(WI.DebuggerObserver.prototype.scriptParsed):
Keep the final response URL and request identifier in `ModuleInformation`, and
format the protocol `requestId` in Inspector so that it can be
process-qualified when site isolation is enabled.
* Source/WebInspectorUI/UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.resourceRequestWillBeSent):
Update assertions for redirects of resources associated with a `WI.Target`.
* Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager):
(WI.DebuggerManager.prototype.scriptDidParse):
(WI.DebuggerManager.prototype._tryAssociateScripts): Added.
(WI.DebuggerManager.prototype._handleResourceAdded): Added.
(WI.DebuggerManager.prototype._handleResourceChanged): Added.
* Source/WebInspectorUI/UserInterface/Models/Resource.js:
(WI.Resource.prototype.get displayName):
(WI.Resource.prototype.associateWithScript):
(WI.Resource.Event.ScriptAssociated): Added.
* Source/WebInspectorUI/UserInterface/Models/Script.js:
(WI.Script):
(WI.Script.isWebAssembly):
(WI.Script.prototype.get customName): Added.
(WI.Script.prototype.tryAssociateWithResource): Added.
(WI.Script.prototype._resolveResource):
(WI.Script.prototype._resolveResource.hasMatchingScript): Added.
(WI.Script.prototype._resolveResource.isMatchingResource): Added.
(WI.Script.Event.ResourceChanged): Added.
Expand how `WI.Script` are associated with a `WI.Resource`.
* Source/WebInspectorUI/UserInterface/Views/ResourceTreeElement.js:
(WI.ResourceTreeElement.prototype.get filterableData):
(WI.ResourceTreeElement.prototype._updateResource):
(WI.ResourceTreeElement.prototype.get mainTitleText):
(WI.ResourceTreeElement.prototype._handleScriptAssociated): Added.
* Source/WebInspectorUI/UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype.didDismissDialog):
(WI.OpenResourceDialog.prototype.didPresentDialog):
(WI.OpenResourceDialog.prototype._handleScriptResourceChanged): Added.
* Source/WebInspectorUI/UserInterface/Views/SearchSidebarPanel.js:
(WI.SearchSidebarPanel.prototype._handleTreeSelectionDidChange):
* Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.closed):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
(WI.SourcesNavigationSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
(WI.SourcesNavigationSidebarPanel.prototype._removeScript): Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleScriptResourceChanged):
Added.
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerScriptRemoved):
* Source/WebInspectorUI/UserInterface/Views/WorkerTreeElement.js:
(WI.WorkerTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
Added.
(WI.WorkerTreeElement.prototype.descendantResourceTreeElementMainTitleDidChange):
Added.
Replace `WI.Script` with its associated `WI.Resource` wherever possible.
* Source/WebInspectorUI/UserInterface/Views/GenericResourceContentView.js:
(WI.GenericResourceContentView.prototype.contentAvailable): Added.
* Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView):
(WI.ResourceClusterContentView.prototype._contentViewForResourceType):
* Source/WebInspectorUI/UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView.prototype._contentDidPopulate):
Show a binary-content message for non-text resources that do not have a more
specific preview.
* Source/WebCore/Modules/fetch/FetchLoaderClient.h:
(WebCore::FetchLoaderClient::didReceiveResponse):
* Source/WebCore/Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::didReceiveResponse):
* Source/WebCore/Modules/fetch/FetchBodyOwner.h:
(WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
* Source/WebCore/Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
* Source/WebCore/Modules/fetch/FetchResponse.h:
(WebCore::FetchResponse::resourceLoaderIdentifier const): Added.
(WebCore::FetchResponse::Loader::didReceiveResponse):
* Source/WebCore/Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::clone):
(WebCore::FetchResponse::Loader::didReceiveResponse):
* Source/WebCore/loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
* Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:
(WebKit::WebServiceWorkerFetchTaskClient::BlobLoader::didReceiveResponse):
* Source/WebKit/WebProcess/Inspector/FrameNetworkAgentProxy.cpp:
(WebKit::FrameNetworkAgentProxy::willSendRequest):
(WebKit::FrameNetworkAgentProxy::willSendRequestOfType):
* Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:
(WebCore::handleResponseOnStreamingAction):
Propagate the request identifier through cloning, `Worker`, `ServiceWorker`,
etc..
* LayoutTests/http/tests/inspector/debugger/wasm/resources/named-module.py:
Added.
* LayoutTests/http/tests/inspector/debugger/wasm/resources/resource-worker.js:
Added.
* LayoutTests/http/tests/inspector/debugger/wasm/script-url.html: Added.
* LayoutTests/http/tests/inspector/debugger/wasm/script-url-expected.txt: Added.
*
LayoutTests/http/tests/site-isolation/inspector/debugger/resources/wasm-frame.html:
Added.
*
LayoutTests/http/tests/site-isolation/inspector/debugger/wasm-frame-placement.html:
Added.
*
LayoutTests/http/tests/site-isolation/inspector/debugger/wasm-frame-placement-expected.txt:
Added.
* LayoutTests/inspector/model/frame-extra-scripts.html:
* LayoutTests/inspector/model/frame-extra-scripts-expected.txt:
* LayoutTests/inspector/model/script-resource-relationship.html:
* LayoutTests/inspector/model/script-resource-relationship-expected.txt:
Canonical link: https://commits.webkit.org/318207@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications