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

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

Issue 114033002: DevTools: Capture async stacks for event listeners. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: construct event description Created 7 years 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
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.h ('k') | Source/core/inspector/InspectorInstrumentation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDebuggerAgent.cpp
diff --git a/Source/core/inspector/InspectorDebuggerAgent.cpp b/Source/core/inspector/InspectorDebuggerAgent.cpp
index aceaae4e39a91fd124d0d23e9fa00a60d50ae3c8..5c827554bae08b51383694e1ed9264e85d4d4e00 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -708,8 +708,30 @@ void InspectorDebuggerAgent::didFireAnimationFrame()
m_asyncCallStackTracker.didFireAsyncCall();
}
+void InspectorDebuggerAgent::didAddEventListener(EventTarget* eventTarget, const AtomicString& eventType, EventListener* listener, bool useCapture)
+{
+ if (m_asyncCallStackTracker.isEnabled())
yurys 2013/12/16 15:03:55 We should be able to avoid this check by setting d
aandrey 2013/12/16 15:20:22 The Debugger agent can function both w/ and w/o as
+ m_asyncCallStackTracker.didAddEventListener(eventTarget, eventType, listener, useCapture, scriptDebugServer().currentCallFrames());
+}
+
+void InspectorDebuggerAgent::didRemoveEventListener(EventTarget* eventTarget, const AtomicString& eventType, EventListener* listener, bool useCapture)
+{
+ m_asyncCallStackTracker.didRemoveEventListener(eventTarget, eventType, listener, useCapture);
+}
+
+void InspectorDebuggerAgent::didRemoveAllEventListeners(EventTarget* eventTarget)
+{
+ m_asyncCallStackTracker.didRemoveAllEventListeners(eventTarget);
+}
+
+void InspectorDebuggerAgent::willHandleEvent(EventTarget* eventTarget, const AtomicString& eventType, EventListener* listener, bool useCapture)
+{
+ m_asyncCallStackTracker.willHandleEvent(eventTarget, eventType, listener, useCapture);
+}
+
void InspectorDebuggerAgent::didHandleEvent()
{
+ m_asyncCallStackTracker.didFireAsyncCall();
cancelPauseOnNextStatement();
}
« no previous file with comments | « Source/core/inspector/InspectorDebuggerAgent.h ('k') | Source/core/inspector/InspectorInstrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698