| Index: Source/core/inspector/InspectorDebuggerAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| index 07b9e851bc62e4b192bc884b774652bb6a491061..48d806950988088429edc5f7003185b8b63a2089 100644
|
| --- a/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| +++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
|
| @@ -655,11 +655,62 @@ void InspectorDebuggerAgent::cancelPauseOnNextStatement()
|
| scriptDebugServer().setPauseOnNextStatement(false);
|
| }
|
|
|
| +void InspectorDebuggerAgent::requestAsyncCallFramesIfNeeded()
|
| +{
|
| + if (m_asyncCallStackTracker.isEnabled())
|
| + scriptDebugServer().requestAsyncCallFrames();
|
| +}
|
| +
|
| +void InspectorDebuggerAgent::didRequestAsyncCallFrames(ScriptValue callFrames)
|
| +{
|
| + m_asyncCallStackTracker.didRequestAsyncCallFrames(callFrames);
|
| +}
|
| +
|
| +void InspectorDebuggerAgent::didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singleShot)
|
| +{
|
| + m_asyncCallStackTracker.didInstallTimer(timerId, singleShot);
|
| + requestAsyncCallFramesIfNeeded();
|
| +}
|
| +
|
| +void InspectorDebuggerAgent::didRemoveTimer(ExecutionContext*, int timerId)
|
| +{
|
| + m_asyncCallStackTracker.didRemoveTimer(timerId);
|
| +}
|
| +
|
| +bool InspectorDebuggerAgent::willFireTimer(ExecutionContext*, int timerId)
|
| +{
|
| + m_asyncCallStackTracker.willFireTimer(timerId);
|
| + return true;
|
| +}
|
| +
|
| void InspectorDebuggerAgent::didFireTimer()
|
| {
|
| + m_asyncCallStackTracker.didAsyncCall();
|
| cancelPauseOnNextStatement();
|
| }
|
|
|
| +void InspectorDebuggerAgent::didRequestAnimationFrame(Document*, int callbackId)
|
| +{
|
| + m_asyncCallStackTracker.didRequestAnimationFrame(callbackId);
|
| + requestAsyncCallFramesIfNeeded();
|
| +}
|
| +
|
| +void InspectorDebuggerAgent::didCancelAnimationFrame(Document*, int callbackId)
|
| +{
|
| + m_asyncCallStackTracker.didCancelAnimationFrame(callbackId);
|
| +}
|
| +
|
| +bool InspectorDebuggerAgent::willFireAnimationFrame(Document*, int callbackId)
|
| +{
|
| + m_asyncCallStackTracker.willFireAnimationFrame(callbackId);
|
| + return true;
|
| +}
|
| +
|
| +void InspectorDebuggerAgent::didFireAnimationFrame()
|
| +{
|
| + m_asyncCallStackTracker.didAsyncCall();
|
| +}
|
| +
|
| void InspectorDebuggerAgent::didHandleEvent()
|
| {
|
| cancelPauseOnNextStatement();
|
| @@ -987,7 +1038,7 @@ void InspectorDebuggerAgent::didPause(ScriptState* scriptState, const ScriptValu
|
| InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
|
| if (!injectedScript.hasNoValue()) {
|
| m_breakReason = InspectorFrontend::Debugger::Reason::Exception;
|
| - m_breakAuxData = injectedScript.wrapObject(exception, "backtrace")->openAccessors();
|
| + m_breakAuxData = injectedScript.wrapObject(exception, InspectorDebuggerAgent::backtraceObjectGroup)->openAccessors();
|
| // m_breakAuxData might be null after this.
|
| }
|
| }
|
| @@ -1045,6 +1096,7 @@ void InspectorDebuggerAgent::clear()
|
| m_currentCallStack = ScriptValue();
|
| m_scripts.clear();
|
| m_breakpointIdToDebugServerBreakpointIds.clear();
|
| + m_asyncCallStackTracker.clear();
|
| m_continueToLocationBreakpointId = String();
|
| clearBreakDetails();
|
| m_javaScriptPauseScheduled = false;
|
| @@ -1083,6 +1135,7 @@ void InspectorDebuggerAgent::reset()
|
| {
|
| m_scripts.clear();
|
| m_breakpointIdToDebugServerBreakpointIds.clear();
|
| + m_asyncCallStackTracker.clear();
|
| if (m_frontend)
|
| m_frontend->globalObjectCleared();
|
| }
|
|
|