| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/v8-debugger-agent-impl.h" | 5 #include "src/inspector/v8-debugger-agent-impl.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/injected-script.h" | 10 #include "src/inspector/injected-script.h" |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 m_debugger->removeBreakpoint(debuggerBreakpointId); | 371 m_debugger->removeBreakpoint(debuggerBreakpointId); |
| 372 m_serverBreakpoints.erase(debuggerBreakpointId); | 372 m_serverBreakpoints.erase(debuggerBreakpointId); |
| 373 } | 373 } |
| 374 m_breakpointIdToDebuggerBreakpointIds.erase(breakpointId); | 374 m_breakpointIdToDebuggerBreakpointIds.erase(breakpointId); |
| 375 } | 375 } |
| 376 | 376 |
| 377 Response V8DebuggerAgentImpl::getPossibleBreakpoints( | 377 Response V8DebuggerAgentImpl::getPossibleBreakpoints( |
| 378 std::unique_ptr<protocol::Debugger::Location> start, | 378 std::unique_ptr<protocol::Debugger::Location> start, |
| 379 Maybe<protocol::Debugger::Location> end, | 379 Maybe<protocol::Debugger::Location> end, |
| 380 std::unique_ptr<protocol::Array<protocol::Debugger::Location>>* locations) { | 380 std::unique_ptr<protocol::Array<protocol::Debugger::Location>>* locations) { |
| 381 v8::HandleScope handles(m_isolate); |
| 381 String16 scriptId = start->getScriptId(); | 382 String16 scriptId = start->getScriptId(); |
| 382 | 383 |
| 383 if (start->getLineNumber() < 0 || start->getColumnNumber(0) < 0) | 384 if (start->getLineNumber() < 0 || start->getColumnNumber(0) < 0) |
| 384 return Response::Error( | 385 return Response::Error( |
| 385 "start.lineNumber and start.columnNumber should be >= 0"); | 386 "start.lineNumber and start.columnNumber should be >= 0"); |
| 386 | 387 |
| 387 v8::DebugInterface::Location v8Start(start->getLineNumber(), | 388 v8::DebugInterface::Location v8Start(start->getLineNumber(), |
| 388 start->getColumnNumber(0)); | 389 start->getColumnNumber(0)); |
| 389 v8::DebugInterface::Location v8End; | 390 v8::DebugInterface::Location v8End; |
| 390 if (end.isJust()) { | 391 if (end.isJust()) { |
| (...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 | 1264 |
| 1264 void V8DebuggerAgentImpl::reset() { | 1265 void V8DebuggerAgentImpl::reset() { |
| 1265 if (!enabled()) return; | 1266 if (!enabled()) return; |
| 1266 m_scheduledDebuggerStep = NoStep; | 1267 m_scheduledDebuggerStep = NoStep; |
| 1267 m_scripts.clear(); | 1268 m_scripts.clear(); |
| 1268 m_blackboxedPositions.clear(); | 1269 m_blackboxedPositions.clear(); |
| 1269 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1270 m_breakpointIdToDebuggerBreakpointIds.clear(); |
| 1270 } | 1271 } |
| 1271 | 1272 |
| 1272 } // namespace v8_inspector | 1273 } // namespace v8_inspector |
| OLD | NEW |