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 0e073b81ca09a97ff9bc3f5e7075b7751c3efb76..db71c5d8d3fc8fe4624012951711a0c785df5eb4 100644 |
--- a/src/inspector/v8-debugger-agent-impl.cc |
+++ b/src/inspector/v8-debugger-agent-impl.cc |
@@ -764,6 +764,8 @@ Response V8DebuggerAgentImpl::setPauseOnExceptions( |
} |
void V8DebuggerAgentImpl::setPauseOnExceptionsImpl(int pauseState) { |
+ // TODO(dgozman): this changes the global state and forces all context groups |
+ // to pause. We should make this flag be per-context-group. |
m_debugger->setPauseOnExceptionsState( |
static_cast<v8::debug::ExceptionBreakState>(pauseState)); |
m_state->setInteger(DebuggerAgentState::pauseOnExceptionsState, pauseState); |
@@ -1137,7 +1139,7 @@ void V8DebuggerAgentImpl::didPause(int contextId, |
v8::Local<v8::Value> exception, |
const std::vector<String16>& hitBreakpoints, |
bool isPromiseRejection, bool isUncaught, |
- bool isOOMBreak) { |
+ bool isOOMBreak, bool isAssert) { |
JavaScriptCallFrames frames = m_debugger->currentCallFrames(); |
m_pausedCallFrames.swap(frames); |
v8::HandleScope handles(m_isolate); |
@@ -1147,6 +1149,9 @@ void V8DebuggerAgentImpl::didPause(int contextId, |
if (isOOMBreak) { |
hitReasons.push_back( |
std::make_pair(protocol::Debugger::Paused::ReasonEnum::OOM, nullptr)); |
+ } else if (isAssert) { |
+ hitReasons.push_back(std::make_pair( |
+ protocol::Debugger::Paused::ReasonEnum::Assert, nullptr)); |
} else if (!exception.IsEmpty()) { |
InjectedScript* injectedScript = nullptr; |
m_session->findInjectedScript(contextId, injectedScript); |
@@ -1254,15 +1259,6 @@ void V8DebuggerAgentImpl::breakProgram( |
} |
} |
-void V8DebuggerAgentImpl::breakProgramOnException( |
- const String16& breakReason, |
- std::unique_ptr<protocol::DictionaryValue> data) { |
- if (!enabled() || |
- m_debugger->getPauseOnExceptionsState() == v8::debug::NoBreakOnException) |
- return; |
- breakProgram(breakReason, std::move(data)); |
-} |
- |
void V8DebuggerAgentImpl::setBreakpointAt(const String16& scriptId, |
int lineNumber, int columnNumber, |
BreakpointSource source, |