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

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

Issue 2882213004: [inspector] move continueToLocation implementation to debugger (Closed)
Patch Set: ac Created 3 years, 7 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/inspector/v8-debugger-agent-impl.h ('k') | no next file » | 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 8af7d5243418c7e559b1b5ce5d7fa2087d9a1217..9e276539f0021a987ecf9d1d942a74ca91ea4abf 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -247,7 +247,6 @@ Response V8DebuggerAgentImpl::disable() {
m_scripts.clear();
m_breakpointIdToDebuggerBreakpointIds.clear();
m_debugger->setAsyncCallStackDepth(this, 0);
- m_continueToLocationBreakpointId = String16();
clearBreakDetails();
m_skipAllPauses = false;
m_state->setBoolean(DebuggerAgentState::skipAllPauses, false);
@@ -486,19 +485,9 @@ Response V8DebuggerAgentImpl::getPossibleBreakpoints(
Response V8DebuggerAgentImpl::continueToLocation(
std::unique_ptr<protocol::Debugger::Location> location) {
if (!enabled()) return Response::Error(kDebuggerNotEnabled);
- if (!m_continueToLocationBreakpointId.isEmpty()) {
- m_debugger->removeBreakpoint(m_continueToLocationBreakpointId);
- m_continueToLocationBreakpointId = "";
- }
-
- ScriptBreakpoint breakpoint(location->getScriptId(),
- location->getLineNumber(),
- location->getColumnNumber(0), String16());
-
- m_continueToLocationBreakpointId = m_debugger->setBreakpoint(
- breakpoint, &breakpoint.line_number, &breakpoint.column_number);
- // TODO(kozyatinskiy): Return actual line and column number.
- return resume();
+ if (!isPaused()) return Response::Error(kDebuggerNotPaused);
+ return m_debugger->continueToLocation(m_session->contextGroupId(),
+ std::move(location));
}
bool V8DebuggerAgentImpl::isFunctionBlackboxed(const String16& scriptId,
@@ -1233,11 +1222,6 @@ void V8DebuggerAgentImpl::didPause(int contextId,
m_frontend.paused(std::move(protocolCallFrames), breakReason,
std::move(breakAuxData), std::move(hitBreakpointIds),
currentAsyncStackTrace());
-
- if (!m_continueToLocationBreakpointId.isEmpty()) {
- m_debugger->removeBreakpoint(m_continueToLocationBreakpointId);
- m_continueToLocationBreakpointId = "";
- }
}
void V8DebuggerAgentImpl::didContinue() {
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698