Commit 83d7c4d3 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

Report reliable embedderName in scriptParsed/scriptFailedToParse

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: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69078}
parent 8b694beb
...@@ -572,6 +572,8 @@ domain Debugger ...@@ -572,6 +572,8 @@ domain Debugger
experimental optional integer codeOffset experimental optional integer codeOffset
# The language of the script. # The language of the script.
experimental optional Debugger.ScriptLanguage scriptLanguage experimental optional Debugger.ScriptLanguage scriptLanguage
# The name the embedder supplied for this script.
experimental optional string embedderName
# Fired when virtual machine parses script. This event is also fired for all known and uncollected # Fired when virtual machine parses script. This event is also fired for all known and uncollected
# scripts upon enabling debugger. # scripts upon enabling debugger.
...@@ -613,6 +615,8 @@ domain Debugger ...@@ -613,6 +615,8 @@ domain Debugger
experimental optional Debugger.ScriptLanguage scriptLanguage experimental optional Debugger.ScriptLanguage scriptLanguage
# If the scriptLanguage is WebASsembly, the source of debug symbols for the module. # If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
experimental optional Debugger.DebugSymbols debugSymbols experimental optional Debugger.DebugSymbols debugSymbols
# The name the embedder supplied for this script.
experimental optional string embedderName
experimental domain HeapProfiler experimental domain HeapProfiler
depends on Runtime depends on Runtime
......
...@@ -1559,6 +1559,7 @@ void V8DebuggerAgentImpl::didParseSource( ...@@ -1559,6 +1559,7 @@ void V8DebuggerAgentImpl::didParseSource(
bool isModule = script->isModule(); bool isModule = script->isModule();
String16 scriptId = script->scriptId(); String16 scriptId = script->scriptId();
String16 scriptURL = script->sourceURL(); String16 scriptURL = script->sourceURL();
String16 embedderName = script->embedderName();
String16 scriptLanguage = getScriptLanguage(*script); String16 scriptLanguage = getScriptLanguage(*script);
Maybe<int> codeOffset; Maybe<int> codeOffset;
if (script->getLanguage() == V8DebuggerScript::Language::WebAssembly) if (script->getLanguage() == V8DebuggerScript::Language::WebAssembly)
...@@ -1601,7 +1602,7 @@ void V8DebuggerAgentImpl::didParseSource( ...@@ -1601,7 +1602,7 @@ void V8DebuggerAgentImpl::didParseSource(
scriptRef->hash(), std::move(executionContextAuxDataParam), scriptRef->hash(), std::move(executionContextAuxDataParam),
std::move(sourceMapURLParam), hasSourceURLParam, isModuleParam, std::move(sourceMapURLParam), hasSourceURLParam, isModuleParam,
scriptRef->length(), std::move(stackTrace), std::move(codeOffset), scriptRef->length(), std::move(stackTrace), std::move(codeOffset),
std::move(scriptLanguage)); std::move(scriptLanguage), embedderName);
return; return;
} }
...@@ -1611,7 +1612,7 @@ void V8DebuggerAgentImpl::didParseSource( ...@@ -1611,7 +1612,7 @@ void V8DebuggerAgentImpl::didParseSource(
std::move(executionContextAuxDataParam), isLiveEditParam, std::move(executionContextAuxDataParam), isLiveEditParam,
std::move(sourceMapURLParam), hasSourceURLParam, isModuleParam, 0, std::move(sourceMapURLParam), hasSourceURLParam, isModuleParam, 0,
std::move(stackTrace), std::move(codeOffset), std::move(scriptLanguage), std::move(stackTrace), std::move(codeOffset), std::move(scriptLanguage),
std::move(debugSymbols)); std::move(debugSymbols), embedderName);
} else { } else {
m_frontend.scriptParsed( m_frontend.scriptParsed(
scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(),
...@@ -1620,7 +1621,7 @@ void V8DebuggerAgentImpl::didParseSource( ...@@ -1620,7 +1621,7 @@ void V8DebuggerAgentImpl::didParseSource(
isLiveEditParam, std::move(sourceMapURLParam), hasSourceURLParam, isLiveEditParam, std::move(sourceMapURLParam), hasSourceURLParam,
isModuleParam, scriptRef->length(), std::move(stackTrace), isModuleParam, scriptRef->length(), std::move(stackTrace),
std::move(codeOffset), std::move(scriptLanguage), std::move(codeOffset), std::move(scriptLanguage),
std::move(debugSymbols)); std::move(debugSymbols), embedderName);
} }
std::vector<protocol::DictionaryValue*> potentialBreakpoints; std::vector<protocol::DictionaryValue*> potentialBreakpoints;
......
...@@ -94,7 +94,8 @@ class ActualScript : public V8DebuggerScript { ...@@ -94,7 +94,8 @@ class ActualScript : public V8DebuggerScript {
bool isLiveEdit, V8DebuggerAgentImpl* agent, bool isLiveEdit, V8DebuggerAgentImpl* agent,
V8InspectorClient* client) V8InspectorClient* client)
: V8DebuggerScript(isolate, String16::fromInteger(script->Id()), : V8DebuggerScript(isolate, String16::fromInteger(script->Id()),
GetScriptURL(isolate, script, client)), GetScriptURL(isolate, script, client),
GetScriptName(isolate, script, client)),
m_agent(agent), m_agent(agent),
m_isLiveEdit(isLiveEdit) { m_isLiveEdit(isLiveEdit) {
Initialize(script); Initialize(script);
...@@ -266,6 +267,12 @@ class ActualScript : public V8DebuggerScript { ...@@ -266,6 +267,12 @@ class ActualScript : public V8DebuggerScript {
v8::Local<v8::String> sourceURL; v8::Local<v8::String> sourceURL;
if (script->SourceURL().ToLocal(&sourceURL) && sourceURL->Length() > 0) if (script->SourceURL().ToLocal(&sourceURL) && sourceURL->Length() > 0)
return toProtocolString(isolate, sourceURL); return toProtocolString(isolate, sourceURL);
return GetScriptName(isolate, script, client);
}
static String16 GetScriptName(v8::Isolate* isolate,
v8::Local<v8::debug::Script> script,
V8InspectorClient* client) {
v8::Local<v8::String> v8Name; v8::Local<v8::String> v8Name;
if (script->Name().ToLocal(&v8Name) && v8Name->Length() > 0) { if (script->Name().ToLocal(&v8Name) && v8Name->Length() > 0) {
String16 name = toProtocolString(isolate, v8Name); String16 name = toProtocolString(isolate, v8Name);
...@@ -358,8 +365,11 @@ std::unique_ptr<V8DebuggerScript> V8DebuggerScript::Create( ...@@ -358,8 +365,11 @@ std::unique_ptr<V8DebuggerScript> V8DebuggerScript::Create(
} }
V8DebuggerScript::V8DebuggerScript(v8::Isolate* isolate, String16 id, V8DebuggerScript::V8DebuggerScript(v8::Isolate* isolate, String16 id,
String16 url) String16 url, String16 embedderName)
: m_id(std::move(id)), m_url(std::move(url)), m_isolate(isolate) {} : m_id(std::move(id)),
m_url(std::move(url)),
m_isolate(isolate),
m_embedderName(embedderName) {}
V8DebuggerScript::~V8DebuggerScript() = default; V8DebuggerScript::~V8DebuggerScript() = default;
......
...@@ -56,6 +56,7 @@ class V8DebuggerScript { ...@@ -56,6 +56,7 @@ class V8DebuggerScript {
const String16& scriptId() const { return m_id; } const String16& scriptId() const { return m_id; }
bool hasSourceURLComment() const { return m_hasSourceURLComment; } bool hasSourceURLComment() const { return m_hasSourceURLComment; }
const String16& sourceURL() const { return m_url; } const String16& sourceURL() const { return m_url; }
const String16& embedderName() const { return m_embedderName; }
virtual const String16& sourceMappingURL() const = 0; virtual const String16& sourceMappingURL() const = 0;
virtual String16 source(size_t pos, size_t len = UINT_MAX) const = 0; virtual String16 source(size_t pos, size_t len = UINT_MAX) const = 0;
...@@ -98,7 +99,8 @@ class V8DebuggerScript { ...@@ -98,7 +99,8 @@ class V8DebuggerScript {
virtual bool setBreakpointOnRun(int* id) const = 0; virtual bool setBreakpointOnRun(int* id) const = 0;
protected: protected:
V8DebuggerScript(v8::Isolate*, String16 id, String16 url); V8DebuggerScript(v8::Isolate*, String16 id, String16 url,
String16 embedderName);
virtual v8::Local<v8::debug::Script> script() const = 0; virtual v8::Local<v8::debug::Script> script() const = 0;
...@@ -108,6 +110,7 @@ class V8DebuggerScript { ...@@ -108,6 +110,7 @@ class V8DebuggerScript {
int m_executionContextId = 0; int m_executionContextId = 0;
v8::Isolate* m_isolate; v8::Isolate* m_isolate;
String16 m_embedderName;
private: private:
DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript); DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript);
......
...@@ -4,6 +4,7 @@ Running test: testLoadedModulesOnDebuggerEnable ...@@ -4,6 +4,7 @@ Running test: testLoadedModulesOnDebuggerEnable
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : module1.js
endColumn : 1 endColumn : 1
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -25,6 +26,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled ...@@ -25,6 +26,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : module2.js
endColumn : 1 endColumn : 1
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -44,6 +46,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled ...@@ -44,6 +46,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName : module-with-syntax-error-2.js
endColumn : 1 endColumn : 1
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
...@@ -2,6 +2,7 @@ getPossibleBreakpoints should not crash during lazy compilation (crbug.com/71533 ...@@ -2,6 +2,7 @@ getPossibleBreakpoints should not crash during lazy compilation (crbug.com/71533
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName :
endColumn : 23 endColumn : 23
endLine : 2 endLine : 2
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
...@@ -3,6 +3,7 @@ Check script with url: ...@@ -3,6 +3,7 @@ Check script with url:
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : prefix://url
endColumn : 16 endColumn : 16
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -23,6 +24,7 @@ Check script with sourceURL comment: ...@@ -23,6 +24,7 @@ Check script with sourceURL comment:
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : prefix://url
endColumn : 37 endColumn : 37
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -43,6 +45,7 @@ Check script failed to parse: ...@@ -43,6 +45,7 @@ Check script failed to parse:
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName : prefix://url
endColumn : 15 endColumn : 15
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -62,6 +65,7 @@ Check script failed to parse with sourceURL comment: ...@@ -62,6 +65,7 @@ Check script failed to parse with sourceURL comment:
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName : prefix://url
endColumn : 36 endColumn : 36
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
...@@ -4,6 +4,7 @@ scriptParsed ...@@ -4,6 +4,7 @@ scriptParsed
scriptSource : function foo1(){}//# sourceURL=oneline.js<nl> scriptSource : function foo1(){}//# sourceURL=oneline.js<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -24,6 +25,7 @@ scriptParsed ...@@ -24,6 +25,7 @@ scriptParsed
scriptSource : function foo2(){}//# sourceURL=oneline-without-nl.js scriptSource : function foo2(){}//# sourceURL=oneline-without-nl.js
} }
{ {
embedderName :
endColumn : 52 endColumn : 52
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -44,6 +46,7 @@ scriptParsed ...@@ -44,6 +46,7 @@ scriptParsed
scriptSource : function foo3(){}<nl>//# sourceURL=twoline.js<nl> scriptSource : function foo3(){}<nl>//# sourceURL=twoline.js<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 2 endLine : 2
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -64,6 +67,7 @@ scriptParsed ...@@ -64,6 +67,7 @@ scriptParsed
scriptSource : function foo4(){}<nl><nl>//# sourceURL=threeline.js<nl> scriptSource : function foo4(){}<nl><nl>//# sourceURL=threeline.js<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -84,6 +88,7 @@ scriptParsed ...@@ -84,6 +88,7 @@ scriptParsed
scriptSource : function foo5(){}//# sourceMappingURL=oneline-map<nl> scriptSource : function foo5(){}//# sourceMappingURL=oneline-map<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -104,6 +109,7 @@ scriptParsed ...@@ -104,6 +109,7 @@ scriptParsed
scriptSource : function foo6(){}//# sourceMappingURL=oneline-without-nl-map scriptSource : function foo6(){}//# sourceMappingURL=oneline-without-nl-map
} }
{ {
embedderName :
endColumn : 60 endColumn : 60
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -124,6 +130,7 @@ scriptParsed ...@@ -124,6 +130,7 @@ scriptParsed
scriptSource : function foo7(){}<nl>//# sourceMappingURL=twoline-map<nl> scriptSource : function foo7(){}<nl>//# sourceMappingURL=twoline-map<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 2 endLine : 2
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -144,6 +151,7 @@ scriptParsed ...@@ -144,6 +151,7 @@ scriptParsed
scriptSource : function foo8(){}<nl><nl>//# sourceMappingURL=threeline-map<nl> scriptSource : function foo8(){}<nl><nl>//# sourceMappingURL=threeline-map<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -164,6 +172,7 @@ scriptParsed ...@@ -164,6 +172,7 @@ scriptParsed
scriptSource : function foo9(){}//# sourceMappingURL=source-mapping-url-map<nl>//# sourceURL=source-url.js scriptSource : function foo9(){}//# sourceMappingURL=source-mapping-url-map<nl>//# sourceURL=source-url.js
} }
{ {
embedderName :
endColumn : 27 endColumn : 27
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -184,6 +193,7 @@ scriptParsed ...@@ -184,6 +193,7 @@ scriptParsed
scriptSource : function foo10(){}//# sourceURL=source-url.js<nl>//# sourceMappingURL=source-mapping-url-map scriptSource : function foo10(){}//# sourceURL=source-url.js<nl>//# sourceMappingURL=source-mapping-url-map
} }
{ {
embedderName :
endColumn : 43 endColumn : 43
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -204,6 +214,7 @@ scriptParsed ...@@ -204,6 +214,7 @@ scriptParsed
scriptSource : function foo11(){}<nl>//# sourceURL=end1.js scriptSource : function foo11(){}<nl>//# sourceURL=end1.js
} }
{ {
embedderName :
endColumn : 21 endColumn : 21
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -224,6 +235,7 @@ scriptParsed ...@@ -224,6 +235,7 @@ scriptParsed
scriptSource : function foo12(){}<nl>//# sourceURL=end2.js scriptSource : function foo12(){}<nl>//# sourceURL=end2.js
} }
{ {
embedderName :
endColumn : 22 endColumn : 22
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -244,6 +256,7 @@ scriptParsed ...@@ -244,6 +256,7 @@ scriptParsed
scriptSource : function foo13(){} scriptSource : function foo13(){}
} }
{ {
embedderName :
endColumn : 18 endColumn : 18
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -264,6 +277,7 @@ scriptParsed ...@@ -264,6 +277,7 @@ scriptParsed
scriptSource : function foo15(){}; eval("function foo14(){}//# sourceURL=eval.js")//# sourceURL=eval-wrapper.js scriptSource : function foo15(){}; eval("function foo14(){}//# sourceURL=eval.js")//# sourceURL=eval-wrapper.js
} }
{ {
embedderName :
endColumn : 96 endColumn : 96
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -284,6 +298,7 @@ scriptParsed ...@@ -284,6 +298,7 @@ scriptParsed
scriptSource : function foo14(){}//# sourceURL=eval.js scriptSource : function foo14(){}//# sourceURL=eval.js
} }
{ {
embedderName :
endColumn : 39 endColumn : 39
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -304,6 +319,7 @@ scriptParsed ...@@ -304,6 +319,7 @@ scriptParsed
scriptSource : function foo16(){}<nl> scriptSource : function foo16(){}<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -324,6 +340,7 @@ scriptParsed ...@@ -324,6 +340,7 @@ scriptParsed
scriptSource : function foo17(){}<nl><nl> scriptSource : function foo17(){}<nl><nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 2 endLine : 2
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -344,6 +361,7 @@ scriptParsed ...@@ -344,6 +361,7 @@ scriptParsed
scriptSource : function foo18(){}<nl><nl><nl> scriptSource : function foo18(){}<nl><nl><nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -364,6 +382,7 @@ scriptParsed ...@@ -364,6 +382,7 @@ scriptParsed
scriptSource : function foo19(){}<nl><nl><nl><nl> scriptSource : function foo19(){}<nl><nl><nl><nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 4 endLine : 4
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -384,6 +403,7 @@ scriptParsed ...@@ -384,6 +403,7 @@ scriptParsed
scriptSource : function foo1(){}//# sourceURL=oneline.js<nl> scriptSource : function foo1(){}//# sourceURL=oneline.js<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -404,6 +424,7 @@ scriptParsed ...@@ -404,6 +424,7 @@ scriptParsed
scriptSource : function foo2(){}//# sourceURL=oneline-without-nl.js scriptSource : function foo2(){}//# sourceURL=oneline-without-nl.js
} }
{ {
embedderName :
endColumn : 52 endColumn : 52
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -424,6 +445,7 @@ scriptParsed ...@@ -424,6 +445,7 @@ scriptParsed
scriptSource : function foo3(){}<nl>//# sourceURL=twoline.js<nl> scriptSource : function foo3(){}<nl>//# sourceURL=twoline.js<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 2 endLine : 2
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -444,6 +466,7 @@ scriptParsed ...@@ -444,6 +466,7 @@ scriptParsed
scriptSource : function foo4(){}<nl><nl>//# sourceURL=threeline.js<nl> scriptSource : function foo4(){}<nl><nl>//# sourceURL=threeline.js<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -464,6 +487,7 @@ scriptParsed ...@@ -464,6 +487,7 @@ scriptParsed
scriptSource : function foo5(){}//# sourceMappingURL=oneline-map<nl> scriptSource : function foo5(){}//# sourceMappingURL=oneline-map<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -484,6 +508,7 @@ scriptParsed ...@@ -484,6 +508,7 @@ scriptParsed
scriptSource : function foo6(){}//# sourceMappingURL=oneline-without-nl-map scriptSource : function foo6(){}//# sourceMappingURL=oneline-without-nl-map
} }
{ {
embedderName :
endColumn : 60 endColumn : 60
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -504,6 +529,7 @@ scriptParsed ...@@ -504,6 +529,7 @@ scriptParsed
scriptSource : function foo7(){}<nl>//# sourceMappingURL=twoline-map<nl> scriptSource : function foo7(){}<nl>//# sourceMappingURL=twoline-map<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 2 endLine : 2
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -524,6 +550,7 @@ scriptParsed ...@@ -524,6 +550,7 @@ scriptParsed
scriptSource : function foo8(){}<nl><nl>//# sourceMappingURL=threeline-map<nl> scriptSource : function foo8(){}<nl><nl>//# sourceMappingURL=threeline-map<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -544,6 +571,7 @@ scriptParsed ...@@ -544,6 +571,7 @@ scriptParsed
scriptSource : function foo9(){}//# sourceMappingURL=source-mapping-url-map<nl>//# sourceURL=source-url.js scriptSource : function foo9(){}//# sourceMappingURL=source-mapping-url-map<nl>//# sourceURL=source-url.js
} }
{ {
embedderName :
endColumn : 27 endColumn : 27
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -564,6 +592,7 @@ scriptParsed ...@@ -564,6 +592,7 @@ scriptParsed
scriptSource : function foo10(){}//# sourceURL=source-url.js<nl>//# sourceMappingURL=source-mapping-url-map scriptSource : function foo10(){}//# sourceURL=source-url.js<nl>//# sourceMappingURL=source-mapping-url-map
} }
{ {
embedderName :
endColumn : 43 endColumn : 43
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -584,6 +613,7 @@ scriptParsed ...@@ -584,6 +613,7 @@ scriptParsed
scriptSource : function foo11(){}<nl>//# sourceURL=end1.js scriptSource : function foo11(){}<nl>//# sourceURL=end1.js
} }
{ {
embedderName :
endColumn : 21 endColumn : 21
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -604,6 +634,7 @@ scriptParsed ...@@ -604,6 +634,7 @@ scriptParsed
scriptSource : function foo12(){}<nl>//# sourceURL=end2.js scriptSource : function foo12(){}<nl>//# sourceURL=end2.js
} }
{ {
embedderName :
endColumn : 22 endColumn : 22
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -624,6 +655,7 @@ scriptParsed ...@@ -624,6 +655,7 @@ scriptParsed
scriptSource : function foo13(){} scriptSource : function foo13(){}
} }
{ {
embedderName :
endColumn : 18 endColumn : 18
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -644,6 +676,7 @@ scriptParsed ...@@ -644,6 +676,7 @@ scriptParsed
scriptSource : function foo15(){}; eval("function foo14(){}//# sourceURL=eval.js")//# sourceURL=eval-wrapper.js scriptSource : function foo15(){}; eval("function foo14(){}//# sourceURL=eval.js")//# sourceURL=eval-wrapper.js
} }
{ {
embedderName :
endColumn : 96 endColumn : 96
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -664,6 +697,7 @@ scriptParsed ...@@ -664,6 +697,7 @@ scriptParsed
scriptSource : function foo14(){}//# sourceURL=eval.js scriptSource : function foo14(){}//# sourceURL=eval.js
} }
{ {
embedderName :
endColumn : 39 endColumn : 39
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -695,6 +729,7 @@ scriptFailedToParse ...@@ -695,6 +729,7 @@ scriptFailedToParse
scriptSource : {a:2:<nl>//# sourceURL=http://a.js scriptSource : {a:2:<nl>//# sourceURL=http://a.js
} }
{ {
embedderName :
endColumn : 25 endColumn : 25
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -714,6 +749,7 @@ scriptFailedToParse ...@@ -714,6 +749,7 @@ scriptFailedToParse
scriptSource : }//# sourceURL=failed.js<nl>//# sourceMappingURL=failed-map scriptSource : }//# sourceURL=failed.js<nl>//# sourceMappingURL=failed-map
} }
{ {
embedderName :
endColumn : 31 endColumn : 31
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -733,6 +769,7 @@ scriptParsed ...@@ -733,6 +769,7 @@ scriptParsed
scriptSource : function foo16(){}<nl> scriptSource : function foo16(){}<nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 1 endLine : 1
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -753,6 +790,7 @@ scriptParsed ...@@ -753,6 +790,7 @@ scriptParsed
scriptSource : function foo17(){}<nl><nl> scriptSource : function foo17(){}<nl><nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 2 endLine : 2
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -773,6 +811,7 @@ scriptParsed ...@@ -773,6 +811,7 @@ scriptParsed
scriptSource : function foo18(){}<nl><nl><nl> scriptSource : function foo18(){}<nl><nl><nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 3 endLine : 3
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -793,6 +832,7 @@ scriptParsed ...@@ -793,6 +832,7 @@ scriptParsed
scriptSource : function foo19(){}<nl><nl><nl><nl> scriptSource : function foo19(){}<nl><nl><nl><nl>
} }
{ {
embedderName :
endColumn : 0 endColumn : 0
endLine : 4 endLine : 4
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
...@@ -2,6 +2,7 @@ Debugger.scriptParsed.stackTrace should contain only one frame ...@@ -2,6 +2,7 @@ Debugger.scriptParsed.stackTrace should contain only one frame
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 0 endColumn : 0
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
...@@ -3,6 +3,7 @@ Runtime.evaluate with valid expression ...@@ -3,6 +3,7 @@ Runtime.evaluate with valid expression
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 29 endColumn : 29
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -23,6 +24,7 @@ Runtime.evaluate with syntax error ...@@ -23,6 +24,7 @@ Runtime.evaluate with syntax error
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName :
endColumn : 39 endColumn : 39
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -42,6 +44,7 @@ Runtime.callFunctionOn with valid functionDeclaration ...@@ -42,6 +44,7 @@ Runtime.callFunctionOn with valid functionDeclaration
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 18 endColumn : 18
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -62,6 +65,7 @@ Runtime.callFunctionOn with syntax error ...@@ -62,6 +65,7 @@ Runtime.callFunctionOn with syntax error
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName :
endColumn : 3 endColumn : 3
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -81,6 +85,7 @@ Runtime.compileScript with valid expression ...@@ -81,6 +85,7 @@ Runtime.compileScript with valid expression
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : compile-script.js
endColumn : 4 endColumn : 4
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -101,6 +106,7 @@ Runtime.compileScript with syntax error ...@@ -101,6 +106,7 @@ Runtime.compileScript with syntax error
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName : compile-script-syntax-error.js
endColumn : 1 endColumn : 1
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -121,6 +127,7 @@ Runtime.evaluate compiled script with stack trace ...@@ -121,6 +127,7 @@ Runtime.evaluate compiled script with stack trace
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 8 endColumn : 8
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -140,6 +147,7 @@ Runtime.evaluate compiled script with stack trace ...@@ -140,6 +147,7 @@ Runtime.evaluate compiled script with stack trace
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 39 endColumn : 39
endLine : 4 endLine : 4
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -170,6 +178,7 @@ Runtime.evaluate compiled script with stack trace ...@@ -170,6 +178,7 @@ Runtime.evaluate compiled script with stack trace
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 4 endColumn : 4
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -201,6 +210,7 @@ Runtime.evaluate compile script error with stack trace ...@@ -201,6 +210,7 @@ Runtime.evaluate compile script error with stack trace
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 12 endColumn : 12
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -220,6 +230,7 @@ Runtime.evaluate compile script error with stack trace ...@@ -220,6 +230,7 @@ Runtime.evaluate compile script error with stack trace
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName :
endColumn : 48 endColumn : 48
endLine : 4 endLine : 4
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -250,6 +261,7 @@ Runtime.evaluate compile script error with stack trace ...@@ -250,6 +261,7 @@ Runtime.evaluate compile script error with stack trace
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName :
endColumn : 3 endColumn : 3
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
Tests scripts hasing Tests scripts hasing
{ {
embedderName : foo1.js
endColumn : 1 endColumn : 1
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -16,6 +17,7 @@ Tests scripts hasing ...@@ -16,6 +17,7 @@ Tests scripts hasing
url : foo1.js url : foo1.js
} }
{ {
embedderName : foo2.js
endColumn : 3 endColumn : 3
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -32,6 +34,7 @@ Tests scripts hasing ...@@ -32,6 +34,7 @@ Tests scripts hasing
url : foo2.js url : foo2.js
} }
{ {
embedderName : foo3.js
endColumn : 8106 endColumn : 8106
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
...@@ -2,6 +2,7 @@ Checks basic ES6 modules support. ...@@ -2,6 +2,7 @@ Checks basic ES6 modules support.
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : module1
endColumn : 17 endColumn : 17
endLine : 5 endLine : 5
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -21,6 +22,7 @@ Checks basic ES6 modules support. ...@@ -21,6 +22,7 @@ Checks basic ES6 modules support.
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : module2
endColumn : 17 endColumn : 17
endLine : 5 endLine : 5
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -40,6 +42,7 @@ Checks basic ES6 modules support. ...@@ -40,6 +42,7 @@ Checks basic ES6 modules support.
{ {
method : Debugger.scriptParsed method : Debugger.scriptParsed
params : { params : {
embedderName : module3
endColumn : 0 endColumn : 0
endLine : 11 endLine : 11
executionContextId : <executionContextId> executionContextId : <executionContextId>
...@@ -201,6 +204,7 @@ console.log(239) ...@@ -201,6 +204,7 @@ console.log(239)
{ {
method : Debugger.scriptFailedToParse method : Debugger.scriptFailedToParse
params : { params : {
embedderName : module4
endColumn : 1 endColumn : 1
endLine : 0 endLine : 0
executionContextId : <executionContextId> executionContextId : <executionContextId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment