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( |