Index: Source/core/inspector/InspectorDebuggerAgent.cpp |
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp |
index 4eeeba1cadc5a51039ae56c0c637f0a13aaa64d0..b18588e3bd8f79aced0bb39376adcfb142c1539e 100644 |
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp |
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp |
@@ -881,6 +881,27 @@ void InspectorDebuggerAgent::didReceiveV8AsyncTaskEvent(ExecutionContext* contex |
ASSERT_NOT_REACHED(); |
} |
+void InspectorDebuggerAgent::didReceiveV8NewPromiseEvent(ExecutionContext* context, v8::Handle<v8::Object> promise) |
+{ |
+ if (!m_promiseTracker.isEnabled()) |
+ return; |
+ m_promiseTracker.didCreatePromise(context, promise); |
+} |
+ |
+void InspectorDebuggerAgent::didReceiveV8UpdatePromiseEvent(ExecutionContext* context, v8::Handle<v8::Object> promise, int status, v8::Handle<v8::Value> value) |
+{ |
+ if (!m_promiseTracker.isEnabled()) |
+ return; |
+ m_promiseTracker.didUpdatePromiseStatus(context, promise, status, value); |
+} |
+ |
+void InspectorDebuggerAgent::didReceiveV8ChainPromiseEvent(ExecutionContext* context, v8::Handle<v8::Object> promise, v8::Handle<v8::Object> parentPromise) |
+{ |
+ if (!m_promiseTracker.isEnabled()) |
+ return; |
+ m_promiseTracker.didUpdatePromiseParent(context, promise, parentPromise); |
+} |
+ |
void InspectorDebuggerAgent::pause(ErrorString*) |
{ |
if (m_javaScriptPauseScheduled || isPaused()) |
@@ -1384,6 +1405,7 @@ void InspectorDebuggerAgent::clear() |
m_scripts.clear(); |
m_breakpointIdToDebugServerBreakpointIds.clear(); |
m_asyncCallStackTracker.clear(); |
+ m_promiseTracker.clear(); |
m_continueToLocationBreakpointId = String(); |
clearBreakDetails(); |
m_javaScriptPauseScheduled = false; |
@@ -1426,6 +1448,7 @@ void InspectorDebuggerAgent::reset() |
m_scripts.clear(); |
m_breakpointIdToDebugServerBreakpointIds.clear(); |
m_asyncCallStackTracker.clear(); |
+ m_promiseTracker.clear(); |
if (m_frontend) |
m_frontend->globalObjectCleared(); |
} |