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

Unified Diff: src/inspector/v8-debugger-agent-impl.cc

Issue 2531163010: [inspector] Introduce debug::WasmScript (Closed)
Patch Set: Fix expected output 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.cc ('k') | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger-agent-impl.cc
diff --git a/src/inspector/v8-debugger-agent-impl.cc b/src/inspector/v8-debugger-agent-impl.cc
index a2b2f44aa04c272da5de64a3d9223d499bcb615d..f89f2cd86a4978689df7d5aed85d09906c01ce23 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -63,8 +63,7 @@ static const char kDebuggerNotPaused[] =
namespace {
void TranslateWasmStackTraceLocations(Array<CallFrame>* stackTrace,
- WasmTranslation* wasmTranslation,
- int context_group_id) {
+ WasmTranslation* wasmTranslation) {
for (size_t i = 0, e = stackTrace->length(); i != e; ++i) {
protocol::Debugger::Location* location = stackTrace->get(i)->getLocation();
String16 scriptId = location->getScriptId();
@@ -72,7 +71,7 @@ void TranslateWasmStackTraceLocations(Array<CallFrame>* stackTrace,
int columnNumber = location->getColumnNumber(-1);
if (!wasmTranslation->TranslateWasmScriptLocationToProtocolLocation(
- &scriptId, &lineNumber, &columnNumber, context_group_id)) {
+ &scriptId, &lineNumber, &columnNumber)) {
continue;
}
@@ -515,6 +514,7 @@ std::unique_ptr<protocol::Debugger::Location>
V8DebuggerAgentImpl::resolveBreakpoint(const String16& breakpointId,
const ScriptBreakpoint& breakpoint,
BreakpointSource source) {
+ v8::HandleScope handles(m_isolate);
DCHECK(enabled());
// FIXME: remove these checks once crbug.com/520702 is resolved.
CHECK(!breakpointId.isEmpty());
@@ -526,12 +526,9 @@ V8DebuggerAgentImpl::resolveBreakpoint(const String16& breakpointId,
return nullptr;
ScriptBreakpoint translatedBreakpoint = breakpoint;
- if (m_scripts.count(breakpoint.script_id) == 0) {
- m_debugger->wasmTranslation()
- ->TranslateProtocolLocationToWasmScriptLocation(
- &translatedBreakpoint.script_id, &translatedBreakpoint.line_number,
- &translatedBreakpoint.column_number);
- }
+ m_debugger->wasmTranslation()->TranslateProtocolLocationToWasmScriptLocation(
+ &translatedBreakpoint.script_id, &translatedBreakpoint.line_number,
+ &translatedBreakpoint.column_number);
int actualLineNumber;
int actualColumnNumber;
@@ -1033,8 +1030,8 @@ Response V8DebuggerAgentImpl::currentCallFrames(
protocol::ErrorSupport errorSupport;
*result = Array<CallFrame>::fromValue(protocolValue.get(), &errorSupport);
if (!*result) return Response::Error(errorSupport.errors());
- TranslateWasmStackTraceLocations(result->get(), m_debugger->wasmTranslation(),
- m_session->contextGroupId());
+ TranslateWasmStackTraceLocations(result->get(),
+ m_debugger->wasmTranslation());
return Response::OK();
}
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698