| 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/inspector/injected-script.h" | 9 #include "src/inspector/injected-script.h" |
| 10 #include "src/inspector/inspected-context.h" | 10 #include "src/inspector/inspected-context.h" |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 *errorString = "Unknown pause on exceptions mode: " + stringPauseState; | 698 *errorString = "Unknown pause on exceptions mode: " + stringPauseState; |
| 699 return; | 699 return; |
| 700 } | 700 } |
| 701 setPauseOnExceptionsImpl(errorString, pauseState); | 701 setPauseOnExceptionsImpl(errorString, pauseState); |
| 702 } | 702 } |
| 703 | 703 |
| 704 void V8DebuggerAgentImpl::setPauseOnExceptionsImpl(ErrorString* errorString, | 704 void V8DebuggerAgentImpl::setPauseOnExceptionsImpl(ErrorString* errorString, |
| 705 int pauseState) { | 705 int pauseState) { |
| 706 m_debugger->setPauseOnExceptionsState( | 706 m_debugger->setPauseOnExceptionsState( |
| 707 static_cast<V8Debugger::PauseOnExceptionsState>(pauseState)); | 707 static_cast<V8Debugger::PauseOnExceptionsState>(pauseState)); |
| 708 if (m_debugger->getPauseOnExceptionsState() != pauseState) | 708 m_state->setInteger(DebuggerAgentState::pauseOnExceptionsState, pauseState); |
| 709 *errorString = "Internal error. Could not change pause on exceptions state"; | |
| 710 else | |
| 711 m_state->setInteger(DebuggerAgentState::pauseOnExceptionsState, pauseState); | |
| 712 } | 709 } |
| 713 | 710 |
| 714 void V8DebuggerAgentImpl::evaluateOnCallFrame( | 711 void V8DebuggerAgentImpl::evaluateOnCallFrame( |
| 715 ErrorString* errorString, const String16& callFrameId, | 712 ErrorString* errorString, const String16& callFrameId, |
| 716 const String16& expression, const Maybe<String16>& objectGroup, | 713 const String16& expression, const Maybe<String16>& objectGroup, |
| 717 const Maybe<bool>& includeCommandLineAPI, const Maybe<bool>& silent, | 714 const Maybe<bool>& includeCommandLineAPI, const Maybe<bool>& silent, |
| 718 const Maybe<bool>& returnByValue, const Maybe<bool>& generatePreview, | 715 const Maybe<bool>& returnByValue, const Maybe<bool>& generatePreview, |
| 719 std::unique_ptr<RemoteObject>* result, | 716 std::unique_ptr<RemoteObject>* result, |
| 720 Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails) { | 717 Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails) { |
| 721 if (!assertPaused(errorString)) return; | 718 if (!assertPaused(errorString)) return; |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 | 1243 |
| 1247 void V8DebuggerAgentImpl::reset() { | 1244 void V8DebuggerAgentImpl::reset() { |
| 1248 if (!enabled()) return; | 1245 if (!enabled()) return; |
| 1249 m_scheduledDebuggerStep = NoStep; | 1246 m_scheduledDebuggerStep = NoStep; |
| 1250 m_scripts.clear(); | 1247 m_scripts.clear(); |
| 1251 m_blackboxedPositions.clear(); | 1248 m_blackboxedPositions.clear(); |
| 1252 m_breakpointIdToDebuggerBreakpointIds.clear(); | 1249 m_breakpointIdToDebuggerBreakpointIds.clear(); |
| 1253 } | 1250 } |
| 1254 | 1251 |
| 1255 } // namespace v8_inspector | 1252 } // namespace v8_inspector |
| OLD | NEW |