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

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: Address review comments + track Promise result 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..9eb6e70a658fb2165bf36d8e7a54af47af103f6d 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -797,6 +797,24 @@ void InspectorDebuggerAgent::didPerformPromiseTask()
m_asyncCallStackTracker.didFireAsyncCall();
}
+void InspectorDebuggerAgent::addPromise(ExecutionContext* context, v8::Handle<v8::Object> promise, v8::Handle<v8::Object> parentPromise, V8PromiseCustom::PromiseState state) {
+ if (m_promiseOfficer.isEnabled()) {
aandrey 2014/02/26 16:11:30 drop curly braces. also below
Alexandra Mikhaylova 2014/02/28 13:52:05 Done.
+ m_promiseOfficer.addPromise(context, promise, parentPromise, state);
+ }
+}
+
+void InspectorDebuggerAgent::setPromiseParent(ExecutionContext* context, v8::Handle<v8::Object> promise, v8::Handle<v8::Object> parentPromise) {
+ if (m_promiseOfficer.isEnabled()) {
+ m_promiseOfficer.setPromiseParent(context, promise, parentPromise);
+ }
+}
+
+void InspectorDebuggerAgent::setPromiseStateAndResult(ExecutionContext* context, v8::Handle<v8::Object> promise, v8::Handle<v8::Value> result, V8PromiseCustom::PromiseState state) {
+ if (m_promiseOfficer.isEnabled()) {
+ m_promiseOfficer.setPromiseStateAndResult(context, promise, result, state);
+ }
+}
+
void InspectorDebuggerAgent::pause(ErrorString*)
{
if (m_javaScriptPauseScheduled)

Powered by Google App Engine
This is Rietveld 408576698