| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 .build(); | 476 .build(); |
| 477 if (v8Locations[i].type() != v8::debug::kCommonBreakLocation) { | 477 if (v8Locations[i].type() != v8::debug::kCommonBreakLocation) { |
| 478 breakLocation->setType(breakLocationType(v8Locations[i].type())); | 478 breakLocation->setType(breakLocationType(v8Locations[i].type())); |
| 479 } | 479 } |
| 480 (*locations)->addItem(std::move(breakLocation)); | 480 (*locations)->addItem(std::move(breakLocation)); |
| 481 } | 481 } |
| 482 return Response::OK(); | 482 return Response::OK(); |
| 483 } | 483 } |
| 484 | 484 |
| 485 Response V8DebuggerAgentImpl::continueToLocation( | 485 Response V8DebuggerAgentImpl::continueToLocation( |
| 486 std::unique_ptr<protocol::Debugger::Location> location) { | 486 std::unique_ptr<protocol::Debugger::Location> location, |
| 487 Maybe<String16> targetCallFrames) { |
| 487 if (!enabled()) return Response::Error(kDebuggerNotEnabled); | 488 if (!enabled()) return Response::Error(kDebuggerNotEnabled); |
| 488 if (!isPaused()) return Response::Error(kDebuggerNotPaused); | 489 if (!isPaused()) return Response::Error(kDebuggerNotPaused); |
| 489 return m_debugger->continueToLocation(m_session->contextGroupId(), | 490 return m_debugger->continueToLocation( |
| 490 std::move(location)); | 491 m_session->contextGroupId(), std::move(location), |
| 492 targetCallFrames.fromMaybe( |
| 493 protocol::Debugger::ContinueToLocation::TargetCallFramesEnum::Any)); |
| 491 } | 494 } |
| 492 | 495 |
| 493 bool V8DebuggerAgentImpl::isFunctionBlackboxed(const String16& scriptId, | 496 bool V8DebuggerAgentImpl::isFunctionBlackboxed(const String16& scriptId, |
| 494 const v8::debug::Location& start, | 497 const v8::debug::Location& start, |
| 495 const v8::debug::Location& end) { | 498 const v8::debug::Location& end) { |
| 496 ScriptsMap::iterator it = m_scripts.find(scriptId); | 499 ScriptsMap::iterator it = m_scripts.find(scriptId); |
| 497 if (it == m_scripts.end()) { | 500 if (it == m_scripts.end()) { |
| 498 // Unknown scripts are blackboxed. | 501 // Unknown scripts are blackboxed. |
| 499 return true; | 502 return true; |
| 500 } | 503 } |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 | 1277 |
| 1275 void V8DebuggerAgentImpl::reset() { | 1278 void V8DebuggerAgentImpl::reset() { |
| 1276 if (!enabled()) return; | 1279 if (!enabled()) return; |
| 1277 m_blackboxedPositions.clear(); | 1280 m_blackboxedPositions.clear(); |
| 1278 resetBlackboxedStateCache(); | 1281 resetBlackboxedStateCache(); |
| 1279 m_scripts.clear(); | 1282 m_scripts.clear(); |
| 1280 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1283 m_breakpointIdToDebuggerBreakpointIds.clear(); |
| 1281 } | 1284 } |
| 1282 | 1285 |
| 1283 } // namespace v8_inspector | 1286 } // namespace v8_inspector |
| OLD | NEW |