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

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

Issue 2655653003: [inspector] Expose GetPossibleBreakpoints for wasm (Closed)
Patch Set: Address comments Created 3 years, 11 months 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/debug/debug-interface.h ('k') | src/inspector/v8-debugger-script.h » ('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 8cb5764968fea2bbc24e8f253ffe298853fcc0b6..3a86700221e2ddd9e7f5ad0cb422ff1002920e33 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -473,25 +473,31 @@ V8DebuggerAgentImpl::resolveBreakpoint(const String16& breakpointId,
scriptIterator->second->endLine() < breakpoint.line_number)
return nullptr;
+ // Translate from protocol location to v8 location for the debugger.
ScriptBreakpoint translatedBreakpoint = breakpoint;
m_debugger->wasmTranslation()->TranslateProtocolLocationToWasmScriptLocation(
&translatedBreakpoint.script_id, &translatedBreakpoint.line_number,
&translatedBreakpoint.column_number);
- int actualLineNumber;
- int actualColumnNumber;
String16 debuggerBreakpointId = m_debugger->setBreakpoint(
- translatedBreakpoint, &actualLineNumber, &actualColumnNumber);
+ translatedBreakpoint, &translatedBreakpoint.line_number,
dgozman 2017/01/26 06:24:34 drive-by: it doesn't look safe to pass a part of i
Clemens Hammacher 2017/01/26 09:57:47 Yes, it looks weird. I checked that it works, but
+ &translatedBreakpoint.column_number);
if (debuggerBreakpointId.isEmpty()) return nullptr;
+ // Translate back from v8 location to protocol location for the return value.
+ m_debugger->wasmTranslation()->TranslateWasmScriptLocationToProtocolLocation(
dgozman 2017/01/26 06:24:34 drive-by: why don't we pass ScriptBreakpoint* arou
Clemens Hammacher 2017/01/26 09:57:48 It's not only ScriptBreakpoint object which need t
+ &translatedBreakpoint.script_id, &translatedBreakpoint.line_number,
+ &translatedBreakpoint.column_number);
+
m_serverBreakpoints[debuggerBreakpointId] =
std::make_pair(breakpointId, source);
CHECK(!breakpointId.isEmpty());
m_breakpointIdToDebuggerBreakpointIds[breakpointId].push_back(
debuggerBreakpointId);
- return buildProtocolLocation(translatedBreakpoint.script_id, actualLineNumber,
- actualColumnNumber);
+ return buildProtocolLocation(translatedBreakpoint.script_id,
+ translatedBreakpoint.line_number,
+ translatedBreakpoint.column_number);
}
Response V8DebuggerAgentImpl::searchInContent(
« no previous file with comments | « src/debug/debug-interface.h ('k') | src/inspector/v8-debugger-script.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698