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

Unified Diff: Source/core/inspector/AsyncCallStackTracker.h

Issue 114033002: DevTools: Capture async stacks for event listeners. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed 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/events/EventTarget.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/AsyncCallStackTracker.h
diff --git a/Source/core/inspector/AsyncCallStackTracker.h b/Source/core/inspector/AsyncCallStackTracker.h
index af96e7d77a10dee137968433956f04897f4929db..680098c605615eb3eaca060ceb39f1318016e519 100644
--- a/Source/core/inspector/AsyncCallStackTracker.h
+++ b/Source/core/inspector/AsyncCallStackTracker.h
@@ -41,6 +41,8 @@
namespace WebCore {
+class EventListener;
+class EventTarget;
class ExecutionContext;
class AsyncCallStackTracker {
@@ -83,11 +85,17 @@ public:
void didCancelAnimationFrame(ExecutionContext*, int callbackId);
void willFireAnimationFrame(ExecutionContext*, int callbackId);
+ void didAddEventListener(EventTarget*, const AtomicString& eventType, EventListener*, bool useCapture, const ScriptValue& callFrames);
+ void didRemoveEventListener(EventTarget*, const AtomicString& eventType, EventListener*, bool useCapture);
+ void didRemoveAllEventListeners(EventTarget*);
+ void willHandleEvent(EventTarget*, const AtomicString& eventType, EventListener*, bool useCapture);
+
void didFireAsyncCall();
void clear();
private:
PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, const ScriptValue& callFrames);
+ void setCurrentAsyncCallChain(PassRefPtr<AsyncCallChain>);
static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned);
static bool validateCallFrames(const ScriptValue& callFrames);
@@ -96,6 +104,7 @@ private:
unsigned m_maxAsyncCallStackDepth;
RefPtr<AsyncCallChain> m_currentAsyncCallChain;
+ unsigned m_nestedAsyncCallCount;
typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDataMap;
ExecutionContextDataMap m_executionContextDataMap;
};
« no previous file with comments | « Source/core/events/EventTarget.cpp ('k') | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698