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

Side by Side Diff: src/inspector/wasm-translation.cc

Issue 2549133002: [debug] Remove DebugInterface class (Closed)
Patch Set: Fix overall CL ;) 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/inspector/wasm-translation.h" 5 #include "src/inspector/wasm-translation.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/debug/debug-interface.h" 9 #include "src/debug/debug-interface.h"
10 #include "src/inspector/protocol/Debugger.h" 10 #include "src/inspector/protocol/Debugger.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 DCHECK(ok); 164 DCHECK(ok);
165 return func_index; 165 return func_index;
166 } 166 }
167 167
168 const OffsetTable &GetOffsetTable(const TransLocation *loc) { 168 const OffsetTable &GetOffsetTable(const TransLocation *loc) {
169 int func_index = loc->line; 169 int func_index = loc->line;
170 auto it = offset_tables_.find(func_index); 170 auto it = offset_tables_.find(func_index);
171 if (it != offset_tables_.end()) return it->second; 171 if (it != offset_tables_.end()) return it->second;
172 172
173 v8::Isolate *isolate = loc->translation->isolate_; 173 v8::Isolate *isolate = loc->translation->isolate_;
174 debug::WasmDisassembly disassembly_result = 174 debug::WasmDisassembly disassembly_result = debug::DisassembleWasmFunction(
175 DebugInterface::DisassembleWasmFunction(isolate, script_.Get(isolate), 175 isolate, script_.Get(isolate), func_index);
176 func_index);
177 176
178 it = offset_tables_ 177 it = offset_tables_
179 .insert(std::make_pair(func_index, 178 .insert(std::make_pair(func_index,
180 std::move(disassembly_result.offset_table))) 179 std::move(disassembly_result.offset_table)))
181 .first; 180 .first;
182 181
183 String16 fake_script_id = GetFakeScriptId(loc); 182 String16 fake_script_id = GetFakeScriptId(loc);
184 String16 fake_script_url = GetFakeScriptUrl(loc); 183 String16 fake_script_url = GetFakeScriptUrl(loc);
185 String16 source(disassembly_result.disassembly.data(), 184 String16 source(disassembly_result.disassembly.data(),
186 disassembly_result.disassembly.length()); 185 disassembly_result.disassembly.length());
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 int context_group_id) { 298 int context_group_id) {
300 bool inserted = 299 bool inserted =
301 fake_scripts_.insert(std::make_pair(fake_script->scriptId(), translator)) 300 fake_scripts_.insert(std::make_pair(fake_script->scriptId(), translator))
302 .second; 301 .second;
303 DCHECK(inserted); 302 DCHECK(inserted);
304 USE(inserted); 303 USE(inserted);
305 V8DebuggerAgentImpl *agent = 304 V8DebuggerAgentImpl *agent =
306 debugger_->inspector()->enabledDebuggerAgentForGroup(context_group_id); 305 debugger_->inspector()->enabledDebuggerAgentForGroup(context_group_id);
307 agent->didParseSource(std::move(fake_script), true); 306 agent->didParseSource(std::move(fake_script), true);
308 } 307 }
OLDNEW
« src/api.cc ('K') | « src/inspector/v8-inspector-impl.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698