Repository navigation
Commit 301d6b2
committed
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@main1 parent 2fe096a commit 301d6b2
44 files changed
Lines changed: 1020 additions & 68 deletions
File tree
- LayoutTests
- http/tests
- inspector/debugger/wasm
- resources
- site-isolation/inspector/debugger
- resources
- inspector/model
- Source
- JavaScriptCore
- debugger
- inspector
- agents
- protocol
- wasm
- WebCore
- Modules/fetch
- bindings/js
- inspector/agents
- loader
- WebInspectorUI/UserInterface
- Controllers
- Models
- Protocol
- Views
- WebKit/WebProcess
- Inspector
- Storage
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments