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

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

Issue 177773002: Support Promises instrumentation on backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix in printing NULL parent promises Created 6 years, 10 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 57266f59bb3757f46c98028da10b7bcad92a910c..d25775b36204487a0302c172640dd0e558c6bd1f 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -30,6 +30,7 @@
#include "config.h"
#include "core/inspector/InspectorDebuggerAgent.h"
#include "core/inspector/JavaScriptCallFrame.h"
+//#include "core/inspector/PromiseOfficer.h"
#include "bindings/v8/ScriptDebugServer.h"
#include "bindings/v8/ScriptObject.h"
@@ -781,22 +782,41 @@ void InspectorDebuggerAgent::didDeliverMutationRecords()
void InspectorDebuggerAgent::didPostPromiseTask(ExecutionContext* context, ExecutionContextTask* task, bool isResolved)
{
+ printf("didPostPromiseTask\n");
if (m_asyncCallStackTracker.isEnabled())
m_asyncCallStackTracker.didPostPromiseTask(context, task, isResolved, scriptDebugServer().currentCallFrames());
+
+ // Very dummy
+// PromiseOfficer* officer = new PromiseOfficer();
+// officer->doNothing();
}
void InspectorDebuggerAgent::willPerformPromiseTask(ExecutionContext* context, ExecutionContextTask* task)
{
+ printf("willPerformPromiseTask\n");
if (m_asyncCallStackTracker.isEnabled())
m_asyncCallStackTracker.willPerformPromiseTask(context, task);
}
void InspectorDebuggerAgent::didPerformPromiseTask()
{
+ printf("didPerformPromiseTask\n");
if (m_asyncCallStackTracker.isEnabled())
m_asyncCallStackTracker.didFireAsyncCall();
}
+void InspectorDebuggerAgent::addPromise(ExecutionContext* context, v8::Handle<v8::Object> promise, v8::Handle<v8::Object> parentPromise, V8PromiseCustom::PromiseState state) {
+ m_promiseOfficer.addPromise(context, promise, parentPromise, state);
aandrey 2014/02/25 12:36:07 if enabled() check
Alexandra Mikhaylova 2014/02/26 14:08:41 Done.
+}
+
+void InspectorDebuggerAgent::updatePromiseParent(ExecutionContext* context, v8::Handle<v8::Object> promise, v8::Handle<v8::Object> newParentPromise) {
+ m_promiseOfficer.updatePromiseParent(context, promise, newParentPromise);
+}
+
+void InspectorDebuggerAgent::updatePromiseState(ExecutionContext* context, v8::Handle<v8::Object> promise, V8PromiseCustom::PromiseState newState) {
+ m_promiseOfficer.updatePromiseState(context, promise, newState);
+}
+
void InspectorDebuggerAgent::pause(ErrorString*)
{
if (m_javaScriptPauseScheduled)

Powered by Google App Engine
This is Rietveld 408576698