Commit e71d328f authored by Philip Pfaffe's avatar Philip Pfaffe Committed by Commit Bot

Report additional wasm script info on the CDP

Add a scriptLanguage enum to the new scripts events. This overhauls
crrev.com/c/2011083 that was related. Report the code section offset
as well as the script language on the Debugger.scriptParsed and
Debugger.scriptFailedToParse events.

Bug: chromium:1057569
Change-Id: I40b43f28f0b3e094720db4fc1f07db1a0c293ee0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2083025Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66749}
parent a48da5f6
...@@ -503,6 +503,12 @@ domain Debugger ...@@ -503,6 +503,12 @@ domain Debugger
# Fired when the virtual machine resumed execution. # Fired when the virtual machine resumed execution.
event resumed event resumed
# Enum of possible script languages.
type ScriptLanguage extends string
enum
JavaScript
WebAssembly
# Fired when virtual machine fails to parse the script. # Fired when virtual machine fails to parse the script.
event scriptFailedToParse event scriptFailedToParse
parameters parameters
...@@ -534,6 +540,10 @@ domain Debugger ...@@ -534,6 +540,10 @@ domain Debugger
optional integer length optional integer length
# JavaScript top stack frame of where the script parsed event was triggered if available. # JavaScript top stack frame of where the script parsed event was triggered if available.
experimental optional Runtime.StackTrace stackTrace experimental optional Runtime.StackTrace stackTrace
# If the scriptLanguage is WebAssembly, the code section offset in the module.
experimental optional integer codeOffset
# The language of the script.
experimental optional Debugger.ScriptLanguage scriptLanguage
# 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.
...@@ -569,6 +579,10 @@ domain Debugger ...@@ -569,6 +579,10 @@ domain Debugger
optional integer length optional integer length
# JavaScript top stack frame of where the script parsed event was triggered if available. # JavaScript top stack frame of where the script parsed event was triggered if available.
experimental optional Runtime.StackTrace stackTrace experimental optional Runtime.StackTrace stackTrace
# If the scriptLanguage is WebAssembly, the code section offset in the module.
experimental optional integer codeOffset
# The language of the script.
experimental optional Debugger.ScriptLanguage scriptLanguage
experimental domain HeapProfiler experimental domain HeapProfiler
depends on Runtime depends on Runtime
......
...@@ -9848,6 +9848,15 @@ uint32_t debug::WasmScript::GetFunctionHash(int function_index) { ...@@ -9848,6 +9848,15 @@ uint32_t debug::WasmScript::GetFunctionHash(int function_index) {
function_bytes.length(), 0); function_bytes.length(), 0);
} }
int debug::WasmScript::CodeOffset() const {
i::Handle<i::Script> script = Utils::OpenHandle(this);
DCHECK_EQ(i::Script::TYPE_WASM, script->type());
i::wasm::NativeModule* native_module = script->wasm_native_module();
const i::wasm::WasmModule* module = native_module->module();
return module->code.offset();
}
debug::Location::Location(int line_number, int column_number) debug::Location::Location(int line_number, int column_number)
: line_number_(line_number), : line_number_(line_number),
column_number_(column_number), column_number_(column_number),
......
...@@ -181,6 +181,9 @@ class WasmScript : public Script { ...@@ -181,6 +181,9 @@ class WasmScript : public Script {
int GetContainingFunction(int byte_offset) const; int GetContainingFunction(int byte_offset) const;
uint32_t GetFunctionHash(int function_index); uint32_t GetFunctionHash(int function_index);
int CodeOffset() const;
int CodeLength() const;
}; };
V8_EXPORT_PRIVATE void GetLoadedScripts( V8_EXPORT_PRIVATE void GetLoadedScripts(
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "src/debug/debug-interface.h" #include "src/debug/debug-interface.h"
#include "src/inspector/injected-script.h" #include "src/inspector/injected-script.h"
#include "src/inspector/inspected-context.h" #include "src/inspector/inspected-context.h"
#include "src/inspector/protocol/Debugger.h"
#include "src/inspector/protocol/Protocol.h" #include "src/inspector/protocol/Protocol.h"
#include "src/inspector/remote-object-id.h" #include "src/inspector/remote-object-id.h"
#include "src/inspector/search-util.h" #include "src/inspector/search-util.h"
...@@ -1401,6 +1402,15 @@ bool V8DebuggerAgentImpl::isPaused() const { ...@@ -1401,6 +1402,15 @@ bool V8DebuggerAgentImpl::isPaused() const {
return m_debugger->isPausedInContextGroup(m_session->contextGroupId()); return m_debugger->isPausedInContextGroup(m_session->contextGroupId());
} }
static String16 getScriptLanguage(const V8DebuggerScript& script) {
switch (script.getLanguage()) {
case V8DebuggerScript::Language::WebAssembly:
return protocol::Debugger::ScriptLanguageEnum::WebAssembly;
case V8DebuggerScript::Language::JavaScript:
return protocol::Debugger::ScriptLanguageEnum::JavaScript;
}
}
void V8DebuggerAgentImpl::didParseSource( void V8DebuggerAgentImpl::didParseSource(
std::unique_ptr<V8DebuggerScript> script, bool success) { std::unique_ptr<V8DebuggerScript> script, bool success) {
v8::HandleScope handles(m_isolate); v8::HandleScope handles(m_isolate);
...@@ -1431,6 +1441,11 @@ void V8DebuggerAgentImpl::didParseSource( ...@@ -1431,6 +1441,11 @@ 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 scriptLanguage = getScriptLanguage(*script);
Maybe<int> codeOffset =
script->getLanguage() == V8DebuggerScript::Language::JavaScript
? Maybe<int>()
: script->codeOffset();
m_scripts[scriptId] = std::move(script); m_scripts[scriptId] = std::move(script);
// Release the strong reference to get notified when debugger is the only // Release the strong reference to get notified when debugger is the only
...@@ -1466,7 +1481,8 @@ void V8DebuggerAgentImpl::didParseSource( ...@@ -1466,7 +1481,8 @@ void V8DebuggerAgentImpl::didParseSource(
scriptRef->endLine(), scriptRef->endColumn(), contextId, scriptRef->endLine(), scriptRef->endColumn(), contextId,
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)); scriptRef->length(), std::move(stackTrace), std::move(codeOffset),
std::move(scriptLanguage));
return; return;
} }
...@@ -1477,14 +1493,16 @@ void V8DebuggerAgentImpl::didParseSource( ...@@ -1477,14 +1493,16 @@ void V8DebuggerAgentImpl::didParseSource(
scriptId, scriptURL, 0, 0, 0, 0, contextId, scriptRef->hash(), scriptId, scriptURL, 0, 0, 0, 0, contextId, scriptRef->hash(),
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(stackTrace), std::move(codeOffset),
std::move(scriptLanguage));
} else { } else {
m_frontend.scriptParsed( m_frontend.scriptParsed(
scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(), scriptId, scriptURL, scriptRef->startLine(), scriptRef->startColumn(),
scriptRef->endLine(), scriptRef->endColumn(), contextId, scriptRef->endLine(), scriptRef->endColumn(), contextId,
scriptRef->hash(), std::move(executionContextAuxDataParam), scriptRef->hash(), std::move(executionContextAuxDataParam),
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::vector<protocol::DictionaryValue*> potentialBreakpoints; std::vector<protocol::DictionaryValue*> potentialBreakpoints;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "src/base/memory.h" #include "src/base/memory.h"
#include "src/inspector/inspected-context.h" #include "src/inspector/inspected-context.h"
#include "src/inspector/protocol/Debugger.h"
#include "src/inspector/string-util.h" #include "src/inspector/string-util.h"
#include "src/inspector/v8-debugger-agent-impl.h" #include "src/inspector/v8-debugger-agent-impl.h"
#include "src/inspector/v8-inspector-impl.h" #include "src/inspector/v8-inspector-impl.h"
...@@ -120,10 +121,16 @@ class ActualScript : public V8DebuggerScript { ...@@ -120,10 +121,16 @@ class ActualScript : public V8DebuggerScript {
if (!script->IsWasm()) return v8::Nothing<v8::MemorySpan<const uint8_t>>(); if (!script->IsWasm()) return v8::Nothing<v8::MemorySpan<const uint8_t>>();
return v8::Just(v8::debug::WasmScript::Cast(*script)->Bytecode()); return v8::Just(v8::debug::WasmScript::Cast(*script)->Bytecode());
} }
Language getLanguage() const override { return m_language; }
int startLine() const override { return m_startLine; } int startLine() const override { return m_startLine; }
int startColumn() const override { return m_startColumn; } int startColumn() const override { return m_startColumn; }
int endLine() const override { return m_endLine; } int endLine() const override { return m_endLine; }
int endColumn() const override { return m_endColumn; } int endColumn() const override { return m_endColumn; }
int codeOffset() const override {
auto script = this->script();
if (!script->IsWasm()) return 0;
return v8::debug::WasmScript::Cast(*script)->CodeOffset();
}
bool isSourceLoadedLazily() const override { return false; } bool isSourceLoadedLazily() const override { return false; }
int length() const override { int length() const override {
v8::HandleScope scope(m_isolate); v8::HandleScope scope(m_isolate);
...@@ -274,6 +281,11 @@ class ActualScript : public V8DebuggerScript { ...@@ -274,6 +281,11 @@ class ActualScript : public V8DebuggerScript {
} }
USE(script->ContextId().To(&m_executionContextId)); USE(script->ContextId().To(&m_executionContextId));
if (script->IsWasm()) {
m_language = V8DebuggerScript::Language::WebAssembly;
} else {
m_language = V8DebuggerScript::Language::JavaScript;
}
m_isModule = script->IsModule(); m_isModule = script->IsModule();
...@@ -297,6 +309,7 @@ class ActualScript : public V8DebuggerScript { ...@@ -297,6 +309,7 @@ class ActualScript : public V8DebuggerScript {
V8DebuggerAgentImpl* m_agent; V8DebuggerAgentImpl* m_agent;
String16 m_sourceMappingURL; String16 m_sourceMappingURL;
Language m_language;
bool m_isLiveEdit = false; bool m_isLiveEdit = false;
bool m_isModule = false; bool m_isModule = false;
mutable String16 m_hash; mutable String16 m_hash;
......
...@@ -46,6 +46,7 @@ class V8InspectorClient; ...@@ -46,6 +46,7 @@ class V8InspectorClient;
class V8DebuggerScript { class V8DebuggerScript {
public: public:
enum class Language { JavaScript, WebAssembly };
static std::unique_ptr<V8DebuggerScript> Create( static std::unique_ptr<V8DebuggerScript> Create(
v8::Isolate* isolate, v8::Local<v8::debug::Script> script, v8::Isolate* isolate, v8::Local<v8::debug::Script> script,
bool isLiveEdit, V8DebuggerAgentImpl* agent, V8InspectorClient* client); bool isLiveEdit, V8DebuggerAgentImpl* agent, V8InspectorClient* client);
...@@ -59,11 +60,13 @@ class V8DebuggerScript { ...@@ -59,11 +60,13 @@ class V8DebuggerScript {
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;
virtual v8::Maybe<v8::MemorySpan<const uint8_t>> wasmBytecode() const = 0; virtual v8::Maybe<v8::MemorySpan<const uint8_t>> wasmBytecode() const = 0;
virtual Language getLanguage() const = 0;
virtual const String16& hash() const = 0; virtual const String16& hash() const = 0;
virtual int startLine() const = 0; virtual int startLine() const = 0;
virtual int startColumn() const = 0; virtual int startColumn() const = 0;
virtual int endLine() const = 0; virtual int endLine() const = 0;
virtual int endColumn() const = 0; virtual int endColumn() const = 0;
virtual int codeOffset() const = 0;
int executionContextId() const { return m_executionContextId; } int executionContextId() const { return m_executionContextId; }
virtual bool isLiveEdit() const = 0; virtual bool isLiveEdit() const = 0;
virtual bool isModule() const = 0; virtual bool isModule() const = 0;
......
...@@ -2190,6 +2190,7 @@ bool AsyncStreamingProcessor::ProcessCodeSectionHeader( ...@@ -2190,6 +2190,7 @@ bool AsyncStreamingProcessor::ProcessCodeSectionHeader(
int num_functions, uint32_t offset, int num_functions, uint32_t offset,
std::shared_ptr<WireBytesStorage> wire_bytes_storage, std::shared_ptr<WireBytesStorage> wire_bytes_storage,
int code_section_length) { int code_section_length) {
DCHECK_LE(0, code_section_length);
before_code_section_ = false; before_code_section_ = false;
TRACE_STREAMING("Start the code section with %d functions...\n", TRACE_STREAMING("Start the code section with %d functions...\n",
num_functions); num_functions);
...@@ -2219,6 +2220,8 @@ bool AsyncStreamingProcessor::ProcessCodeSectionHeader( ...@@ -2219,6 +2220,8 @@ bool AsyncStreamingProcessor::ProcessCodeSectionHeader(
uses_liftoff); uses_liftoff);
job_->DoImmediately<AsyncCompileJob::PrepareAndStartCompile>( job_->DoImmediately<AsyncCompileJob::PrepareAndStartCompile>(
decoder_.shared_module(), false, code_size_estimate); decoder_.shared_module(), false, code_size_estimate);
decoder_.set_code_section(offset, static_cast<uint32_t>(code_section_length));
auto* compilation_state = Impl(job_->native_module_->compilation_state()); auto* compilation_state = Impl(job_->native_module_->compilation_state());
compilation_state->SetWireBytesStorage(std::move(wire_bytes_storage)); compilation_state->SetWireBytesStorage(std::move(wire_bytes_storage));
DCHECK_EQ(job_->native_module_->module()->origin, kWasmOrigin); DCHECK_EQ(job_->native_module_->module()->origin, kWasmOrigin);
......
...@@ -913,6 +913,8 @@ class ModuleDecoderImpl : public Decoder { ...@@ -913,6 +913,8 @@ class ModuleDecoderImpl : public Decoder {
if (failed()) break; if (failed()) break;
DecodeFunctionBody(i, size, offset, verify_functions); DecodeFunctionBody(i, size, offset, verify_functions);
} }
DCHECK_GE(pc_offset(), pos);
set_code_section(pos, pc_offset() - pos);
} }
bool CheckFunctionsCount(uint32_t functions_count, uint32_t offset) { bool CheckFunctionsCount(uint32_t functions_count, uint32_t offset) {
...@@ -1204,6 +1206,10 @@ class ModuleDecoderImpl : public Decoder { ...@@ -1204,6 +1206,10 @@ class ModuleDecoderImpl : public Decoder {
return result; return result;
} }
void set_code_section(uint32_t offset, uint32_t size) {
module_->code = {offset, size};
}
// Decodes an entire module. // Decodes an entire module.
ModuleResult DecodeModule(Counters* counters, AccountingAllocator* allocator, ModuleResult DecodeModule(Counters* counters, AccountingAllocator* allocator,
bool verify_functions = true) { bool verify_functions = true) {
...@@ -2036,6 +2042,10 @@ ModuleResult ModuleDecoder::FinishDecoding(bool verify_functions) { ...@@ -2036,6 +2042,10 @@ ModuleResult ModuleDecoder::FinishDecoding(bool verify_functions) {
return impl_->FinishDecoding(verify_functions); return impl_->FinishDecoding(verify_functions);
} }
void ModuleDecoder::set_code_section(uint32_t offset, uint32_t size) {
return impl_->set_code_section(offset, size);
}
size_t ModuleDecoder::IdentifyUnknownSection(ModuleDecoder* decoder, size_t ModuleDecoder::IdentifyUnknownSection(ModuleDecoder* decoder,
Vector<const uint8_t> bytes, Vector<const uint8_t> bytes,
uint32_t offset, uint32_t offset,
......
...@@ -194,6 +194,8 @@ class ModuleDecoder { ...@@ -194,6 +194,8 @@ class ModuleDecoder {
ModuleResult FinishDecoding(bool verify_functions = true); ModuleResult FinishDecoding(bool verify_functions = true);
void set_code_section(uint32_t offset, uint32_t size);
const std::shared_ptr<WasmModule>& shared_module() const; const std::shared_ptr<WasmModule>& shared_module() const;
WasmModule* module() const { return shared_module().get(); } WasmModule* module() const { return shared_module().get(); }
......
...@@ -255,6 +255,7 @@ struct V8_EXPORT_PRIVATE WasmModule { ...@@ -255,6 +255,7 @@ struct V8_EXPORT_PRIVATE WasmModule {
uint32_t num_declared_functions = 0; // excluding imported uint32_t num_declared_functions = 0; // excluding imported
uint32_t num_exported_functions = 0; uint32_t num_exported_functions = 0;
uint32_t num_declared_data_segments = 0; // From the DataCount section. uint32_t num_declared_data_segments = 0; // From the DataCount section.
WireBytesRef code = {0, 0};
WireBytesRef name = {0, 0}; WireBytesRef name = {0, 0};
std::vector<const FunctionSig*> signatures; // by signature index std::vector<const FunctionSig*> signatures; // by signature index
std::vector<uint32_t> signature_ids; // by signature index std::vector<uint32_t> signature_ids; // by signature index
......
...@@ -1215,6 +1215,39 @@ STREAM_TEST(TestCompileErrorFunctionName) { ...@@ -1215,6 +1215,39 @@ STREAM_TEST(TestCompileErrorFunctionName) {
} }
} }
STREAM_TEST(TestSetModuleCodeSection) {
StreamTester tester;
uint8_t code[] = {
U32V_1(1), // functions count
U32V_1(4), // body size
U32V_1(0), // locals count
kExprLocalGet, 0, kExprEnd // body
};
const uint8_t bytes[] = {
WASM_MODULE_HEADER, // module header
kTypeSectionCode, // section code
U32V_1(1 + SIZEOF_SIG_ENTRY_x_x), // section size
U32V_1(1), // type count
SIG_ENTRY_x_x(kLocalI32, kLocalI32), // signature entry
kFunctionSectionCode, // section code
U32V_1(1 + 1), // section size
U32V_1(1), // functions count
0, // signature index
kCodeSectionCode, // section code
U32V_1(arraysize(code)), // section size
};
tester.OnBytesReceived(bytes, arraysize(bytes));
tester.OnBytesReceived(code, arraysize(code));
tester.FinishStream();
tester.RunCompilerTasks();
CHECK_EQ(tester.native_module()->module()->code.offset(), arraysize(bytes));
CHECK_EQ(tester.native_module()->module()->code.length(), arraysize(code));
CHECK(tester.IsPromiseFulfilled());
}
#undef STREAM_TEST #undef STREAM_TEST
} // namespace wasm } // namespace wasm
......
...@@ -13,6 +13,7 @@ Running test: testLoadedModulesOnDebuggerEnable ...@@ -13,6 +13,7 @@ Running test: testLoadedModulesOnDebuggerEnable
isModule : true isModule : true
length : 39 length : 39
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -33,6 +34,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled ...@@ -33,6 +34,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled
isModule : true isModule : true
length : 39 length : 39
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -50,6 +52,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled ...@@ -50,6 +52,7 @@ Running test: testScriptEventsWhenDebuggerIsEnabled
isModule : true isModule : true
length : 1 length : 1
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
......
...@@ -10,6 +10,7 @@ getPossibleBreakpoints should not crash during lazy compilation (crbug.com/71533 ...@@ -10,6 +10,7 @@ getPossibleBreakpoints should not crash during lazy compilation (crbug.com/71533
isModule : false isModule : false
length : 56 length : 56
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
......
...@@ -12,6 +12,7 @@ Check script with url: ...@@ -12,6 +12,7 @@ Check script with url:
isModule : false isModule : false
length : 16 length : 16
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -31,6 +32,7 @@ Check script with sourceURL comment: ...@@ -31,6 +32,7 @@ Check script with sourceURL comment:
isModule : false isModule : false
length : 37 length : 37
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -49,6 +51,7 @@ Check script failed to parse: ...@@ -49,6 +51,7 @@ Check script failed to parse:
isModule : false isModule : false
length : 15 length : 15
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -67,6 +70,7 @@ Check script failed to parse with sourceURL comment: ...@@ -67,6 +70,7 @@ Check script failed to parse with sourceURL comment:
isModule : false isModule : false
length : 36 length : 36
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
......
...@@ -13,6 +13,7 @@ scriptParsed ...@@ -13,6 +13,7 @@ scriptParsed
isModule : false isModule : false
length : 42 length : 42
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -32,6 +33,7 @@ scriptParsed ...@@ -32,6 +33,7 @@ scriptParsed
isModule : false isModule : false
length : 52 length : 52
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -51,6 +53,7 @@ scriptParsed ...@@ -51,6 +53,7 @@ scriptParsed
isModule : false isModule : false
length : 43 length : 43
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -70,6 +73,7 @@ scriptParsed ...@@ -70,6 +73,7 @@ scriptParsed
isModule : false isModule : false
length : 46 length : 46
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -89,6 +93,7 @@ scriptParsed ...@@ -89,6 +93,7 @@ scriptParsed
isModule : false isModule : false
length : 50 length : 50
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : oneline-map sourceMapURL : oneline-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -108,6 +113,7 @@ scriptParsed ...@@ -108,6 +113,7 @@ scriptParsed
isModule : false isModule : false
length : 60 length : 60
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : oneline-without-nl-map sourceMapURL : oneline-without-nl-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -127,6 +133,7 @@ scriptParsed ...@@ -127,6 +133,7 @@ scriptParsed
isModule : false isModule : false
length : 51 length : 51
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : twoline-map sourceMapURL : twoline-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -146,6 +153,7 @@ scriptParsed ...@@ -146,6 +153,7 @@ scriptParsed
isModule : false isModule : false
length : 54 length : 54
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : threeline-map sourceMapURL : threeline-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -165,6 +173,7 @@ scriptParsed ...@@ -165,6 +173,7 @@ scriptParsed
isModule : false isModule : false
length : 88 length : 88
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : source-mapping-url-map sourceMapURL : source-mapping-url-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -184,6 +193,7 @@ scriptParsed ...@@ -184,6 +193,7 @@ scriptParsed
isModule : false isModule : false
length : 89 length : 89
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : source-mapping-url-map sourceMapURL : source-mapping-url-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -203,6 +213,7 @@ scriptParsed ...@@ -203,6 +213,7 @@ scriptParsed
isModule : false isModule : false
length : 40 length : 40
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -222,6 +233,7 @@ scriptParsed ...@@ -222,6 +233,7 @@ scriptParsed
isModule : false isModule : false
length : 41 length : 41
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -241,6 +253,7 @@ scriptParsed ...@@ -241,6 +253,7 @@ scriptParsed
isModule : false isModule : false
length : 18 length : 18
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -260,6 +273,7 @@ scriptParsed ...@@ -260,6 +273,7 @@ scriptParsed
isModule : false isModule : false
length : 96 length : 96
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -279,6 +293,7 @@ scriptParsed ...@@ -279,6 +293,7 @@ scriptParsed
isModule : false isModule : false
length : 39 length : 39
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -298,6 +313,7 @@ scriptParsed ...@@ -298,6 +313,7 @@ scriptParsed
isModule : false isModule : false
length : 19 length : 19
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -317,6 +333,7 @@ scriptParsed ...@@ -317,6 +333,7 @@ scriptParsed
isModule : false isModule : false
length : 20 length : 20
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -336,6 +353,7 @@ scriptParsed ...@@ -336,6 +353,7 @@ scriptParsed
isModule : false isModule : false
length : 21 length : 21
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -355,6 +373,7 @@ scriptParsed ...@@ -355,6 +373,7 @@ scriptParsed
isModule : false isModule : false
length : 22 length : 22
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -374,6 +393,7 @@ scriptParsed ...@@ -374,6 +393,7 @@ scriptParsed
isModule : false isModule : false
length : 42 length : 42
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -393,6 +413,7 @@ scriptParsed ...@@ -393,6 +413,7 @@ scriptParsed
isModule : false isModule : false
length : 52 length : 52
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -412,6 +433,7 @@ scriptParsed ...@@ -412,6 +433,7 @@ scriptParsed
isModule : false isModule : false
length : 43 length : 43
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -431,6 +453,7 @@ scriptParsed ...@@ -431,6 +453,7 @@ scriptParsed
isModule : false isModule : false
length : 46 length : 46
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -450,6 +473,7 @@ scriptParsed ...@@ -450,6 +473,7 @@ scriptParsed
isModule : false isModule : false
length : 50 length : 50
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : oneline-map sourceMapURL : oneline-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -469,6 +493,7 @@ scriptParsed ...@@ -469,6 +493,7 @@ scriptParsed
isModule : false isModule : false
length : 60 length : 60
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : oneline-without-nl-map sourceMapURL : oneline-without-nl-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -488,6 +513,7 @@ scriptParsed ...@@ -488,6 +513,7 @@ scriptParsed
isModule : false isModule : false
length : 51 length : 51
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : twoline-map sourceMapURL : twoline-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -507,6 +533,7 @@ scriptParsed ...@@ -507,6 +533,7 @@ scriptParsed
isModule : false isModule : false
length : 54 length : 54
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : threeline-map sourceMapURL : threeline-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -526,6 +553,7 @@ scriptParsed ...@@ -526,6 +553,7 @@ scriptParsed
isModule : false isModule : false
length : 88 length : 88
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : source-mapping-url-map sourceMapURL : source-mapping-url-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -545,6 +573,7 @@ scriptParsed ...@@ -545,6 +573,7 @@ scriptParsed
isModule : false isModule : false
length : 89 length : 89
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : source-mapping-url-map sourceMapURL : source-mapping-url-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -564,6 +593,7 @@ scriptParsed ...@@ -564,6 +593,7 @@ scriptParsed
isModule : false isModule : false
length : 40 length : 40
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -583,6 +613,7 @@ scriptParsed ...@@ -583,6 +613,7 @@ scriptParsed
isModule : false isModule : false
length : 41 length : 41
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -602,6 +633,7 @@ scriptParsed ...@@ -602,6 +633,7 @@ scriptParsed
isModule : false isModule : false
length : 18 length : 18
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -621,6 +653,7 @@ scriptParsed ...@@ -621,6 +653,7 @@ scriptParsed
isModule : false isModule : false
length : 96 length : 96
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -640,6 +673,7 @@ scriptParsed ...@@ -640,6 +673,7 @@ scriptParsed
isModule : false isModule : false
length : 39 length : 39
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
stackTrace : { stackTrace : {
callFrames : [ callFrames : [
...@@ -669,6 +703,7 @@ scriptFailedToParse ...@@ -669,6 +703,7 @@ scriptFailedToParse
isModule : false isModule : false
length : 31 length : 31
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -687,6 +722,7 @@ scriptFailedToParse ...@@ -687,6 +722,7 @@ scriptFailedToParse
isModule : false isModule : false
length : 56 length : 56
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : failed-map sourceMapURL : failed-map
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -706,6 +742,7 @@ scriptParsed ...@@ -706,6 +742,7 @@ scriptParsed
isModule : false isModule : false
length : 19 length : 19
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -725,6 +762,7 @@ scriptParsed ...@@ -725,6 +762,7 @@ scriptParsed
isModule : false isModule : false
length : 20 length : 20
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -744,6 +782,7 @@ scriptParsed ...@@ -744,6 +782,7 @@ scriptParsed
isModule : false isModule : false
length : 21 length : 21
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -763,6 +802,7 @@ scriptParsed ...@@ -763,6 +802,7 @@ scriptParsed
isModule : false isModule : false
length : 22 length : 22
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
......
...@@ -11,6 +11,7 @@ Debugger.scriptParsed.stackTrace should contain only one frame ...@@ -11,6 +11,7 @@ Debugger.scriptParsed.stackTrace should contain only one frame
isModule : false isModule : false
length : 0 length : 0
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
stackTrace : { stackTrace : {
callFrames : [ callFrames : [
......
...@@ -12,6 +12,7 @@ Runtime.evaluate with valid expression ...@@ -12,6 +12,7 @@ Runtime.evaluate with valid expression
isModule : false isModule : false
length : 29 length : 29
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -30,6 +31,7 @@ Runtime.evaluate with syntax error ...@@ -30,6 +31,7 @@ Runtime.evaluate with syntax error
isModule : false isModule : false
length : 39 length : 39
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -49,6 +51,7 @@ Runtime.callFunctionOn with valid functionDeclaration ...@@ -49,6 +51,7 @@ Runtime.callFunctionOn with valid functionDeclaration
isModule : false isModule : false
length : 18 length : 18
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -67,6 +70,7 @@ Runtime.callFunctionOn with syntax error ...@@ -67,6 +70,7 @@ Runtime.callFunctionOn with syntax error
isModule : false isModule : false
length : 3 length : 3
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -86,6 +90,7 @@ Runtime.compileScript with valid expression ...@@ -86,6 +90,7 @@ Runtime.compileScript with valid expression
isModule : false isModule : false
length : 4 length : 4
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -104,6 +109,7 @@ Runtime.compileScript with syntax error ...@@ -104,6 +109,7 @@ Runtime.compileScript with syntax error
isModule : false isModule : false
length : 1 length : 1
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -124,6 +130,7 @@ Runtime.evaluate compiled script with stack trace ...@@ -124,6 +130,7 @@ Runtime.evaluate compiled script with stack trace
isModule : false isModule : false
length : 8 length : 8
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -142,6 +149,7 @@ Runtime.evaluate compiled script with stack trace ...@@ -142,6 +149,7 @@ Runtime.evaluate compiled script with stack trace
isModule : false isModule : false
length : 86 length : 86
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
stackTrace : { stackTrace : {
callFrames : [ callFrames : [
...@@ -171,6 +179,7 @@ Runtime.evaluate compiled script with stack trace ...@@ -171,6 +179,7 @@ Runtime.evaluate compiled script with stack trace
isModule : false isModule : false
length : 4 length : 4
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
stackTrace : { stackTrace : {
callFrames : [ callFrames : [
...@@ -201,6 +210,7 @@ Runtime.evaluate compile script error with stack trace ...@@ -201,6 +210,7 @@ Runtime.evaluate compile script error with stack trace
isModule : false isModule : false
length : 12 length : 12
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -219,6 +229,7 @@ Runtime.evaluate compile script error with stack trace ...@@ -219,6 +229,7 @@ Runtime.evaluate compile script error with stack trace
isModule : false isModule : false
length : 98 length : 98
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
stackTrace : { stackTrace : {
callFrames : [ callFrames : [
...@@ -247,6 +258,7 @@ Runtime.evaluate compile script error with stack trace ...@@ -247,6 +258,7 @@ Runtime.evaluate compile script error with stack trace
isModule : false isModule : false
length : 3 length : 3
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
stackTrace : { stackTrace : {
callFrames : [ callFrames : [
......
...@@ -9,6 +9,7 @@ Tests scripts hasing ...@@ -9,6 +9,7 @@ Tests scripts hasing
isModule : false isModule : false
length : 1 length : 1
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -24,6 +25,7 @@ Tests scripts hasing ...@@ -24,6 +25,7 @@ Tests scripts hasing
isModule : false isModule : false
length : 3 length : 3
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -39,6 +41,7 @@ Tests scripts hasing ...@@ -39,6 +41,7 @@ Tests scripts hasing
isModule : false isModule : false
length : 8106 length : 8106
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
......
Tests how wasm scripts are reported Tests how wasm scripts are reported
Check that each inspector gets a wasm script at module creation time. Check that each inspector gets a wasm script at module creation time.
Session #1: Script #0 parsed. URL: wasm://wasm/7b04570e. Source map URL: Session #1: Script #0 parsed. URL: wasm://wasm/7b04570e. Source map URL: , module begin: 0, module end: 0, code offset: 34
Session #2: Script #0 parsed. URL: wasm://wasm/7b04570e. Source map URL: Session #2: Script #0 parsed. URL: wasm://wasm/7b04570e. Source map URL: , module begin: 0, module end: 0, code offset: 34
Session #1: Script #1 parsed. URL: wasm://wasm/ba7c35be. Source map URL: wasm://dwarf Session #1: Script #1 parsed. URL: wasm://wasm/ba7c35be. Source map URL: wasm://dwarf, module begin: 0, module end: 0, code offset: 34
Session #2: Script #1 parsed. URL: wasm://wasm/ba7c35be. Source map URL: wasm://dwarf Session #2: Script #1 parsed. URL: wasm://wasm/ba7c35be. Source map URL: wasm://dwarf, module begin: 0, module end: 0, code offset: 34
Session #1: Script #2 parsed. URL: wasm://wasm/1baa71fe. Source map URL: abc Session #1: Script #2 parsed. URL: wasm://wasm/1baa71fe. Source map URL: abc, module begin: 0, module end: 0, code offset: 34
Session #2: Script #2 parsed. URL: wasm://wasm/1baa71fe. Source map URL: abc Session #2: Script #2 parsed. URL: wasm://wasm/1baa71fe. Source map URL: abc, module begin: 0, module end: 0, code offset: 34
Session #1: Script #3 parsed. URL: wasm://wasm/95e97206. Source map URL: abc Session #1: Script #3 parsed. URL: wasm://wasm/95e97206. Source map URL: abc, module begin: 0, module end: 0, code offset: 34
Session #2: Script #3 parsed. URL: wasm://wasm/95e97206. Source map URL: abc Session #2: Script #3 parsed. URL: wasm://wasm/95e97206. Source map URL: abc, module begin: 0, module end: 0, code offset: 34
Session #1: Script #4 parsed. URL: wasm://wasm/7ab47392. Source map URL: abc Session #1: Script #4 parsed. URL: wasm://wasm/7ab47392. Source map URL: abc, module begin: 0, module end: 0, code offset: 34
Session #2: Script #4 parsed. URL: wasm://wasm/7ab47392. Source map URL: abc Session #2: Script #4 parsed. URL: wasm://wasm/7ab47392. Source map URL: abc, module begin: 0, module end: 0, code offset: 34
Session #1: Source for wasm://wasm/7b04570e: Session #1: Source for wasm://wasm/7b04570e:
Raw: 00 61 73 6d 01 00 00 00 01 07 02 60 00 00 60 00 00 03 03 02 00 01 07 08 01 04 6d 61 69 6e 00 01 0a 0e 02 03 00 01 0b 08 00 02 40 41 02 1a 0b 0b 00 1b 04 6e 61 6d 65 01 14 02 00 0b 6e 6f 70 46 75 6e 63 74 69 6f 6e 01 04 6d 61 69 6e Raw: 00 61 73 6d 01 00 00 00 01 07 02 60 00 00 60 00 00 03 03 02 00 01 07 08 01 04 6d 61 69 6e 00 01 0a 0e 02 03 00 01 0b 08 00 02 40 41 02 1a 0b 0b 00 1b 04 6e 61 6d 65 01 14 02 00 0b 6e 6f 70 46 75 6e 63 74 69 6f 6e 01 04 6d 61 69 6e
Imports: [] Imports: []
......
...@@ -85,9 +85,13 @@ function trackScripts(debuggerParams) { ...@@ -85,9 +85,13 @@ function trackScripts(debuggerParams) {
Protocol.Debugger.enable(debuggerParams); Protocol.Debugger.enable(debuggerParams);
Protocol.Debugger.onScriptParsed(handleScriptParsed); Protocol.Debugger.onScriptParsed(handleScriptParsed);
async function loadScript({url, scriptId, sourceMapURL}) { async function loadScript(
InspectorTest.log(`Session #${sessionId}: Script #${scripts.length} parsed. URL: ${url}. Source map URL: ${sourceMapURL}`); {url, scriptId, sourceMapURL, startColumn, endColumn, codeOffset}) {
let {result: {scriptSource, bytecode}} = await Protocol.Debugger.getScriptSource({scriptId}); InspectorTest.log(`Session #${sessionId}: Script #${
scripts.length} parsed. URL: ${url}. Source map URL: ${
sourceMapURL}, module begin: ${startColumn}, module end: ${endColumn}, code offset: ${codeOffset}`);
let {result: {scriptSource, bytecode}} =
await Protocol.Debugger.getScriptSource({scriptId});
if (bytecode) { if (bytecode) {
if (scriptSource) { if (scriptSource) {
InspectorTest.log('Unexpected scriptSource with bytecode: '); InspectorTest.log('Unexpected scriptSource with bytecode: ');
......
...@@ -11,6 +11,7 @@ Checks basic ES6 modules support. ...@@ -11,6 +11,7 @@ Checks basic ES6 modules support.
isModule : true isModule : true
length : 83 length : 83
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -29,6 +30,7 @@ Checks basic ES6 modules support. ...@@ -29,6 +30,7 @@ Checks basic ES6 modules support.
isModule : true isModule : true
length : 84 length : 84
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -47,6 +49,7 @@ Checks basic ES6 modules support. ...@@ -47,6 +49,7 @@ Checks basic ES6 modules support.
isModule : true isModule : true
length : 286 length : 286
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
...@@ -206,6 +209,7 @@ console.log(239) ...@@ -206,6 +209,7 @@ console.log(239)
isModule : true isModule : true
length : 1 length : 1
scriptId : <scriptId> scriptId : <scriptId>
scriptLanguage : JavaScript
sourceMapURL : sourceMapURL :
startColumn : 0 startColumn : 0
startLine : 0 startLine : 0
......
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