83d7c4d34b
Currently, only a scriptURL is reported, which can be over-written by sourceURL comments of the script. This means a script can basically claim to come from anywhere. This means that DevTools doesn't know the resource name the embedder provided if there is a sourceURL comment. This CL adds a `embedderName` field to the scriptParsed and scriptFailedToParse events that reports the name the embedder associated with the script. Bug: chromium:974543 Change-Id: I9863f878f57638174847890d9a3818952b1efc27 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2317310 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#69078}
65 lines
1.7 KiB
Plaintext
65 lines
1.7 KiB
Plaintext
Debugger.scriptParsed and Debugger.scriptFailedToParse with ES6 module
|
|
|
|
Running test: testLoadedModulesOnDebuggerEnable
|
|
{
|
|
method : Debugger.scriptParsed
|
|
params : {
|
|
embedderName : module1.js
|
|
endColumn : 1
|
|
endLine : 3
|
|
executionContextId : <executionContextId>
|
|
hasSourceURL : false
|
|
hash : 03b276dd81b75bf832afbeccbbd273c62dad100c
|
|
isLiveEdit : false
|
|
isModule : true
|
|
length : 39
|
|
scriptId : <scriptId>
|
|
scriptLanguage : JavaScript
|
|
sourceMapURL :
|
|
startColumn : 0
|
|
startLine : 0
|
|
url : module1.js
|
|
}
|
|
}
|
|
|
|
Running test: testScriptEventsWhenDebuggerIsEnabled
|
|
{
|
|
method : Debugger.scriptParsed
|
|
params : {
|
|
embedderName : module2.js
|
|
endColumn : 1
|
|
endLine : 3
|
|
executionContextId : <executionContextId>
|
|
hasSourceURL : false
|
|
hash : 03b276dd81b75bf832afbeccbbd273c62dad100c
|
|
isLiveEdit : false
|
|
isModule : true
|
|
length : 39
|
|
scriptId : <scriptId>
|
|
scriptLanguage : JavaScript
|
|
sourceMapURL :
|
|
startColumn : 0
|
|
startLine : 0
|
|
url : module2.js
|
|
}
|
|
}
|
|
{
|
|
method : Debugger.scriptFailedToParse
|
|
params : {
|
|
embedderName : module-with-syntax-error-2.js
|
|
endColumn : 1
|
|
endLine : 0
|
|
executionContextId : <executionContextId>
|
|
hasSourceURL : false
|
|
hash : 021647ffab1f4e4e82675bc4cd924d3481abe278
|
|
isModule : true
|
|
length : 1
|
|
scriptId : <scriptId>
|
|
scriptLanguage : JavaScript
|
|
sourceMapURL :
|
|
startColumn : 0
|
|
startLine : 0
|
|
url : module-with-syntax-error-2.js
|
|
}
|
|
}
|