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}
53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
Tests scripts hasing
|
|
{
|
|
embedderName : foo1.js
|
|
endColumn : 1
|
|
endLine : 0
|
|
executionContextId : <executionContextId>
|
|
hasSourceURL : false
|
|
hash : 28e2d6c1ab1f4e4e82675bc4cd924d3481abe278
|
|
isLiveEdit : false
|
|
isModule : false
|
|
length : 1
|
|
scriptId : <scriptId>
|
|
scriptLanguage : JavaScript
|
|
sourceMapURL :
|
|
startColumn : 0
|
|
startLine : 0
|
|
url : foo1.js
|
|
}
|
|
{
|
|
embedderName : foo2.js
|
|
endColumn : 3
|
|
endLine : 0
|
|
executionContextId : <executionContextId>
|
|
hasSourceURL : false
|
|
hash : 3dce1fbe923a7e1582675bc4cd924d3481abe278
|
|
isLiveEdit : false
|
|
isModule : false
|
|
length : 3
|
|
scriptId : <scriptId>
|
|
scriptLanguage : JavaScript
|
|
sourceMapURL :
|
|
startColumn : 0
|
|
startLine : 0
|
|
url : foo2.js
|
|
}
|
|
{
|
|
embedderName : foo3.js
|
|
endColumn : 8106
|
|
endLine : 0
|
|
executionContextId : <executionContextId>
|
|
hasSourceURL : false
|
|
hash : 2a3f94401c23c4d8336963ce4656dae27a95edb4
|
|
isLiveEdit : false
|
|
isModule : false
|
|
length : 8106
|
|
scriptId : <scriptId>
|
|
scriptLanguage : JavaScript
|
|
sourceMapURL :
|
|
startColumn : 0
|
|
startLine : 0
|
|
url : foo3.js
|
|
}
|