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

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 404953003: DevTools: Async call stacks for window.postMessage() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 2dc3725be32e1c28dbff75f461fc8f729da915e5..bed966c268feea02ca93fcada945df39cb68eb32 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -128,6 +128,7 @@ public:
, m_stackTrace(stackTrace)
, m_userGestureToken(userGestureToken)
{
+ m_asyncOperationId = InspectorInstrumentation::traceAsyncOperationStarting(executionContext(), "postMessage");
yurys 2014/07/21 12:45:32 If we are OK with storing async id in the instrume
aandrey 2014/07/22 11:08:43 Yes, something like ExecutionContextTask/FileSyste
}
PassRefPtrWillBeRawPtr<MessageEvent> event()
@@ -142,8 +143,10 @@ public:
private:
virtual void fired() OVERRIDE
{
+ InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsyncOperationCompletedCallbackStarting(executionContext(), m_asyncOperationId);
yurys 2014/07/21 12:45:32 Why do you need to merge two hooks into one?
aandrey 2014/07/22 11:08:43 To have only one instrumentation call here. Actual
yurys 2014/07/22 13:09:43 Why is it marked as completed only here? Shouldn't
aandrey 2014/07/22 13:32:14 No, it's on the right place. The async operation "
m_window->postMessageTimerFired(adoptPtr(this));
// This object is deleted now.
+ InspectorInstrumentation::traceAsyncCallbackCompleted(cookie);
}
RefPtrWillBePersistent<LocalDOMWindow> m_window;
@@ -154,6 +157,7 @@ private:
RefPtr<SecurityOrigin> m_targetOrigin;
RefPtrWillBePersistent<ScriptCallStack> m_stackTrace;
RefPtr<UserGestureToken> m_userGestureToken;
+ int m_asyncOperationId;
};
static void disableSuddenTermination()

Powered by Google App Engine
This is Rietveld 408576698