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 00fcd87203fa12ab4f3b8a6f350761dac5b3b3e9..b326fd11676fa8664acb211985a147ab6e0c39ea 100644 |
--- a/src/inspector/v8-debugger-agent-impl.cc |
+++ b/src/inspector/v8-debugger-agent-impl.cc |
@@ -751,6 +751,29 @@ Response V8DebuggerAgentImpl::stepOut() { |
return Response::OK(); |
} |
+void V8DebuggerAgentImpl::scheduleStepIntoAsync( |
+ std::unique_ptr<ScheduleStepIntoAsyncCallback> callback) { |
+ if (!isPaused()) { |
+ callback->sendFailure(Response::Error(kDebuggerNotPaused)); |
+ return; |
+ } |
+ if (m_stepIntoAsyncCallback) { |
+ m_stepIntoAsyncCallback->sendFailure(Response::Error( |
+ "Current scheduled step into async was overriden with new one.")); |
+ } |
+ m_stepIntoAsyncCallback = std::move(callback); |
+ return; |
dgozman
2017/03/01 23:03:57
return;
return;
just to be sure ;-)
kozy
2017/03/02 00:53:03
Done.
|
+} |
+ |
+void V8DebuggerAgentImpl::stepIntoAsyncWasScheduled() { |
+ DCHECK(m_stepIntoAsyncCallback); |
+ m_stepIntoAsyncCallback->sendSuccess(); |
+ m_stepIntoAsyncCallback.reset(); |
+ |
+ m_scheduledDebuggerStep = NoStep; |
+ v8::debug::ClearStepping(m_isolate); |
+} |
+ |
Response V8DebuggerAgentImpl::setPauseOnExceptions( |
const String16& stringPauseState) { |
if (!enabled()) return Response::Error(kDebuggerNotEnabled); |
@@ -1241,6 +1264,12 @@ void V8DebuggerAgentImpl::didPause(int contextId, |
breakAuxData->setArray("reasons", std::move(reasons)); |
} |
+ if (m_stepIntoAsyncCallback) { |
+ m_stepIntoAsyncCallback->sendFailure( |
+ Response::Error("No async task was scheduled.")); |
+ m_stepIntoAsyncCallback.reset(); |
+ } |
+ |
std::unique_ptr<Array<CallFrame>> protocolCallFrames; |
Response response = currentCallFrames(&protocolCallFrames); |
if (!response.isSuccess()) protocolCallFrames = Array<CallFrame>::create(); |