| Index: src/inspector/v8-debugger.cc
|
| diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
|
| index f4980e2f87e1de3d4916b2c526dd7c2c0d107b3b..ca2fcdeea8e26530f93f6c1f39be42724d88ca8a 100644
|
| --- a/src/inspector/v8-debugger.cc
|
| +++ b/src/inspector/v8-debugger.cc
|
| @@ -475,7 +475,7 @@ void V8Debugger::handleProgramBreak(v8::Local<v8::Context> pausedContext,
|
|
|
| V8DebuggerAgentImpl* agent = m_inspector->enabledDebuggerAgentForGroup(
|
| m_inspector->contextGroupId(pausedContext));
|
| - if (!agent) return;
|
| + if (!agent || (agent->skipAllPauses() && !m_scheduledOOMBreak)) return;
|
|
|
| std::vector<String16> breakpointIds;
|
| if (!hitBreakpointNumbers.IsEmpty()) {
|
| @@ -491,24 +491,23 @@ void V8Debugger::handleProgramBreak(v8::Local<v8::Context> pausedContext,
|
|
|
| m_pausedContext = pausedContext;
|
| m_executionState = executionState;
|
| - bool shouldPause =
|
| - agent->didPause(pausedContext, exception, breakpointIds,
|
| - isPromiseRejection, isUncaught, m_scheduledOOMBreak);
|
| - if (shouldPause) {
|
| - m_runningNestedMessageLoop = true;
|
| - int groupId = m_inspector->contextGroupId(pausedContext);
|
| - DCHECK(groupId);
|
| + agent->didPause(InspectedContext::contextId(pausedContext), exception,
|
| + breakpointIds, isPromiseRejection, isUncaught,
|
| + m_scheduledOOMBreak);
|
| + m_runningNestedMessageLoop = true;
|
| + int groupId = m_inspector->contextGroupId(pausedContext);
|
| + DCHECK(groupId);
|
| + {
|
| v8::Context::Scope scope(pausedContext);
|
| v8::Local<v8::Context> context = m_isolate->GetCurrentContext();
|
| CHECK(!context.IsEmpty() &&
|
| context != v8::debug::GetDebugContext(m_isolate));
|
| m_inspector->client()->runMessageLoopOnPause(groupId);
|
| - // The agent may have been removed in the nested loop.
|
| - agent = m_inspector->enabledDebuggerAgentForGroup(
|
| - m_inspector->contextGroupId(pausedContext));
|
| - if (agent) agent->didContinue();
|
| - m_runningNestedMessageLoop = false;
|
| }
|
| + m_runningNestedMessageLoop = false;
|
| + // The agent may have been removed in the nested loop.
|
| + agent = m_inspector->enabledDebuggerAgentForGroup(groupId);
|
| + if (agent) agent->didContinue();
|
| if (m_scheduledOOMBreak) m_isolate->RestoreOriginalHeapLimit();
|
| m_scheduledOOMBreak = false;
|
| m_pausedContext.Clear();
|
|
|