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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp

Issue 1857713004: DevTools: simplify the async instrumentation harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp
index c673c46be675863e8c951dbcb08ed82f3c8f39fe..04dc617a78249cf667bcba3c03a41b142661f562 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseResolver.cpp
@@ -4,6 +4,8 @@
#include "bindings/core/v8/ScriptPromiseResolver.h"
+#include "core/inspector/InspectorInstrumentation.h"
+
namespace blink {
ScriptPromiseResolver::ScriptPromiseResolver(ScriptState* scriptState)
@@ -20,6 +22,7 @@ ScriptPromiseResolver::ScriptPromiseResolver(ScriptState* scriptState)
m_state = Detached;
m_resolver.clear();
}
+ InspectorInstrumentation::asyncTaskScheduled(getExecutionContext(), "Promise", this);
}
void ScriptPromiseResolver::suspend()
@@ -42,6 +45,7 @@ void ScriptPromiseResolver::detach()
m_resolver.clear();
m_value.clear();
m_keepAlive.clear();
+ InspectorInstrumentation::asyncTaskCanceled(getExecutionContext(), this);
}
void ScriptPromiseResolver::keepAliveWhilePending()
@@ -74,6 +78,7 @@ void ScriptPromiseResolver::resolveOrRejectImmediately()
ASSERT(!getExecutionContext()->activeDOMObjectsAreStopped());
ASSERT(!getExecutionContext()->activeDOMObjectsAreSuspended());
{
+ InspectorInstrumentation::AsyncTask asyncTask(getExecutionContext(), this);
if (m_state == Resolving) {
m_resolver.resolve(m_value.newLocal(m_scriptState->isolate()));
} else {

Powered by Google App Engine
This is Rietveld 408576698