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 7de46a1787818170d3e91cd0902a0b2f977ecfcf..98ef28803cd68e2bcde63e9f8af4038eed3101d8 100644 |
--- a/src/inspector/v8-debugger-agent-impl.cc |
+++ b/src/inspector/v8-debugger-agent-impl.cc |
@@ -614,14 +614,6 @@ void V8DebuggerAgentImpl::schedulePauseOnNextStatement( |
pushBreakDetails(breakReason, std::move(data)); |
} |
-void V8DebuggerAgentImpl::schedulePauseOnNextStatementIfSteppingInto() { |
- DCHECK(enabled()); |
- if (m_scheduledDebuggerStep != StepInto || m_javaScriptPauseScheduled || |
- isPaused()) |
- return; |
- m_debugger->setPauseOnNextStatement(true); |
-} |
- |
void V8DebuggerAgentImpl::cancelPauseOnNextStatement() { |
if (m_javaScriptPauseScheduled || isPaused()) return; |
popBreakDetails(); |
@@ -666,6 +658,13 @@ Response V8DebuggerAgentImpl::stepInto() { |
return Response::OK(); |
} |
+Response V8DebuggerAgentImpl::stepIntoAsync() { |
+ if (!isPaused()) return Response::Error(kDebuggerNotPaused); |
+ m_scheduledDebuggerStep = NoStep; |
+ m_session->releaseObjectGroup(kBacktraceObjectGroup); |
+ return m_debugger->stepIntoScheduledCallback(); |
+} |
+ |
Response V8DebuggerAgentImpl::stepOut() { |
if (!isPaused()) return Response::Error(kDebuggerNotPaused); |
m_scheduledDebuggerStep = StepOut; |
@@ -845,8 +844,11 @@ Response V8DebuggerAgentImpl::setBlackboxedRanges( |
void V8DebuggerAgentImpl::willExecuteScript(int scriptId) { |
changeJavaScriptRecursionLevel(+1); |
- if (m_scheduledDebuggerStep != StepInto) return; |
- schedulePauseOnNextStatementIfSteppingInto(); |
+ if (m_scheduledDebuggerStep != StepInto || m_javaScriptPauseScheduled || |
+ isPaused()) { |
+ return; |
+ } |
+ m_debugger->setPauseOnNextStatement(true); |
} |
void V8DebuggerAgentImpl::didExecuteScript() { |
@@ -1158,6 +1160,11 @@ void V8DebuggerAgentImpl::didPause(int contextId, |
breakAuxData->setArray("reasons", std::move(reasons)); |
} |
+ if (m_debugger->stepIntoScheduledCallbackAvailable()) { |
+ if (!breakAuxData) breakAuxData = protocol::DictionaryValue::create(); |
+ breakAuxData->setBoolean("stepIntoAsyncAvailable", true); |
+ } |
+ |
std::unique_ptr<Array<CallFrame>> protocolCallFrames; |
Response response = currentCallFrames(&protocolCallFrames); |
if (!response.isSuccess()) protocolCallFrames = Array<CallFrame>::create(); |
@@ -1193,6 +1200,13 @@ void V8DebuggerAgentImpl::breakProgram( |
m_breakReason.swap(currentScheduledReason); |
} |
+void V8DebuggerAgentImpl::breakProgramIfSteppingInto( |
+ const String16& breakReason, |
+ std::unique_ptr<protocol::DictionaryValue> data) { |
+ if (m_scheduledDebuggerStep != StepInto) return; |
+ breakProgram(breakReason, std::move(data)); |
+} |
+ |
void V8DebuggerAgentImpl::breakProgramOnException( |
const String16& breakReason, |
std::unique_ptr<protocol::DictionaryValue> data) { |