Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.cpp

Issue 131823003: DevTools: Implement async call stacks for Promises. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index dfe81dd4afc9e02306e2894b7f22af48d828f4e3..10aa097e4bbec4a348c3f9ee8b50a47a6f265feb 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -775,6 +775,24 @@ void InspectorDebuggerAgent::didDeliverMutationRecords()
m_asyncCallStackTracker.didFireAsyncCall();
}
+void InspectorDebuggerAgent::didPostPromiseTask(ExecutionContext* context, ExecutionContextTask* task, bool isResolved)
+{
+ if (m_asyncCallStackTracker.isEnabled())
+ m_asyncCallStackTracker.didPostPromiseTask(context, task, isResolved, scriptDebugServer().currentCallFrames());
+}
+
+void InspectorDebuggerAgent::willPerformPromiseTask(ExecutionContext* context, ExecutionContextTask* task)
+{
+ if (m_asyncCallStackTracker.isEnabled())
+ m_asyncCallStackTracker.willPerformPromiseTask(context, task);
+}
+
+void InspectorDebuggerAgent::didPerformPromiseTask()
+{
+ if (m_asyncCallStackTracker.isEnabled())
+ m_asyncCallStackTracker.didFireAsyncCall();
+}
+
void InspectorDebuggerAgent::pause(ErrorString*)
{
if (m_javaScriptPauseScheduled)

Powered by Google App Engine
This is Rietveld 408576698