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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.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/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index f178a4be125a963cdf7ec107985b8652be38d5e2..907552bf8e92c7ae0ea8c3ad2ed0e786fb9c6b17 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -125,7 +125,7 @@ public:
, m_userGestureToken(userGestureToken)
, m_disposalAllowed(true)
{
- m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarting(getExecutionContext(), "postMessage");
+ InspectorInstrumentation::asyncTaskScheduled(window.document(), "postMessage", this);
}
MessageEvent* event() const { return m_event.get(); }
@@ -155,11 +155,10 @@ public:
private:
void fired() override
{
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(getExecutionContext(), m_asyncOperationId);
+ InspectorInstrumentation::AsyncTask asyncTask(m_window->document(), this);
m_disposalAllowed = false;
m_window->postMessageTimerFired(this);
dispose();
- InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
}
void dispose()
@@ -176,7 +175,6 @@ private:
RefPtr<SecurityOrigin> m_targetOrigin;
RefPtr<ScriptCallStack> m_stackTrace;
RefPtr<UserGestureToken> m_userGestureToken;
- int m_asyncOperationId;
bool m_disposalAllowed;
};
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMTimer.cpp ('k') | third_party/WebKit/Source/core/inspector/AsyncCallTracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698