| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 230 | 230 | 
| 231 Response V8DebuggerAgentImpl::disable() { | 231 Response V8DebuggerAgentImpl::disable() { | 
| 232   if (!enabled()) return Response::OK(); | 232   if (!enabled()) return Response::OK(); | 
| 233 | 233 | 
| 234   m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, | 234   m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, | 
| 235                      protocol::DictionaryValue::create()); | 235                      protocol::DictionaryValue::create()); | 
| 236   m_state->setInteger(DebuggerAgentState::pauseOnExceptionsState, | 236   m_state->setInteger(DebuggerAgentState::pauseOnExceptionsState, | 
| 237                       v8::debug::NoBreakOnException); | 237                       v8::debug::NoBreakOnException); | 
| 238   m_state->setInteger(DebuggerAgentState::asyncCallStackDepth, 0); | 238   m_state->setInteger(DebuggerAgentState::asyncCallStackDepth, 0); | 
| 239 | 239 | 
| 240   if (isPaused()) m_debugger->continueProgram(); | 240   if (isPaused()) m_debugger->continueProgram(m_session->contextGroupId()); | 
| 241   m_debugger->disable(); | 241   m_debugger->disable(); | 
| 242   JavaScriptCallFrames emptyCallFrames; | 242   JavaScriptCallFrames emptyCallFrames; | 
| 243   m_pausedCallFrames.swap(emptyCallFrames); | 243   m_pausedCallFrames.swap(emptyCallFrames); | 
| 244   m_blackboxedPositions.clear(); | 244   m_blackboxedPositions.clear(); | 
| 245   m_blackboxPattern.reset(); | 245   m_blackboxPattern.reset(); | 
| 246   resetBlackboxedStateCache(); | 246   resetBlackboxedStateCache(); | 
| 247   m_scripts.clear(); | 247   m_scripts.clear(); | 
| 248   m_breakpointIdToDebuggerBreakpointIds.clear(); | 248   m_breakpointIdToDebuggerBreakpointIds.clear(); | 
| 249   m_debugger->setAsyncCallStackDepth(this, 0); | 249   m_debugger->setAsyncCallStackDepth(this, 0); | 
| 250   m_continueToLocationBreakpointId = String16(); | 250   m_continueToLocationBreakpointId = String16(); | 
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 708   if (m_breakReason.empty()) { | 708   if (m_breakReason.empty()) { | 
| 709     m_debugger->setPauseOnNextStatement(true, m_session->contextGroupId()); | 709     m_debugger->setPauseOnNextStatement(true, m_session->contextGroupId()); | 
| 710   } | 710   } | 
| 711   pushBreakDetails(protocol::Debugger::Paused::ReasonEnum::Other, nullptr); | 711   pushBreakDetails(protocol::Debugger::Paused::ReasonEnum::Other, nullptr); | 
| 712   return Response::OK(); | 712   return Response::OK(); | 
| 713 } | 713 } | 
| 714 | 714 | 
| 715 Response V8DebuggerAgentImpl::resume() { | 715 Response V8DebuggerAgentImpl::resume() { | 
| 716   if (!isPaused()) return Response::Error(kDebuggerNotPaused); | 716   if (!isPaused()) return Response::Error(kDebuggerNotPaused); | 
| 717   m_session->releaseObjectGroup(kBacktraceObjectGroup); | 717   m_session->releaseObjectGroup(kBacktraceObjectGroup); | 
| 718   m_debugger->continueProgram(); | 718   m_debugger->continueProgram(m_session->contextGroupId()); | 
| 719   return Response::OK(); | 719   return Response::OK(); | 
| 720 } | 720 } | 
| 721 | 721 | 
| 722 Response V8DebuggerAgentImpl::stepOver() { | 722 Response V8DebuggerAgentImpl::stepOver() { | 
| 723   if (!isPaused()) return Response::Error(kDebuggerNotPaused); | 723   if (!isPaused()) return Response::Error(kDebuggerNotPaused); | 
| 724   m_session->releaseObjectGroup(kBacktraceObjectGroup); | 724   m_session->releaseObjectGroup(kBacktraceObjectGroup); | 
| 725   m_debugger->stepOverStatement(m_session->contextGroupId()); | 725   m_debugger->stepOverStatement(m_session->contextGroupId()); | 
| 726   return Response::OK(); | 726   return Response::OK(); | 
| 727 } | 727 } | 
| 728 | 728 | 
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1286 | 1286 | 
| 1287 void V8DebuggerAgentImpl::reset() { | 1287 void V8DebuggerAgentImpl::reset() { | 
| 1288   if (!enabled()) return; | 1288   if (!enabled()) return; | 
| 1289   m_blackboxedPositions.clear(); | 1289   m_blackboxedPositions.clear(); | 
| 1290   resetBlackboxedStateCache(); | 1290   resetBlackboxedStateCache(); | 
| 1291   m_scripts.clear(); | 1291   m_scripts.clear(); | 
| 1292   m_breakpointIdToDebuggerBreakpointIds.clear(); | 1292   m_breakpointIdToDebuggerBreakpointIds.clear(); | 
| 1293 } | 1293 } | 
| 1294 | 1294 | 
| 1295 }  // namespace v8_inspector | 1295 }  // namespace v8_inspector | 
| OLD | NEW | 
|---|