Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: src/inspector/wasm-translation.cc

Issue 2532433003: [inspector] Split V8DebuggerScript implementation for wasm (Closed)
Patch Set: Fix rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/v8-debugger-script.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/wasm-translation.cc
diff --git a/src/inspector/wasm-translation.cc b/src/inspector/wasm-translation.cc
index c23bdce8075ebed55175f82dde6872c11dfa4806..515425213ffac865e03c626dc69074288438d41a 100644
--- a/src/inspector/wasm-translation.cc
+++ b/src/inspector/wasm-translation.cc
@@ -160,17 +160,18 @@ class WasmTranslation::TranslatorImpl::DisassemblingTranslator
String16 fake_script_id = GetFakeScriptId(underlyingScriptId, func_idx);
String16 fake_script_url = GetFakeScriptUrl(isolate, func_idx);
+ v8::Local<debug::WasmScript> script = script_.Get(isolate);
// TODO(clemensh): Generate disassembly lazily when queried by the frontend.
- debug::WasmDisassembly disassembly =
- script_.Get(isolate)->DisassembleFunction(func_idx);
+ debug::WasmDisassembly disassembly = script->DisassembleFunction(func_idx);
DCHECK_EQ(0, offset_tables_.count(func_idx));
offset_tables_.insert(
std::make_pair(func_idx, std::move(disassembly.offset_table)));
String16 source(disassembly.disassembly.data(),
disassembly.disassembly.length());
- std::unique_ptr<V8DebuggerScript> fake_script(new V8DebuggerScript(
- fake_script_id, std::move(fake_script_url), source));
+ std::unique_ptr<V8DebuggerScript> fake_script =
+ V8DebuggerScript::CreateWasm(isolate, script, fake_script_id,
+ std::move(fake_script_url), source);
translation->AddFakeScript(fake_script->scriptId(), this);
agent->didParseSource(std::move(fake_script), true);
« no previous file with comments | « src/inspector/v8-debugger-script.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698