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

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

Issue 111653002: DevTools: Track async stacks on the corresponding execution context. (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 | « no previous file | 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 e4982159bf8ecaac57b7aa61809556739188b70d..fd25ac18f373224215b181b0f5dc51daf5b96348 100644
--- a/Source/core/inspector/AsyncCallStackTracker.h
+++ b/Source/core/inspector/AsyncCallStackTracker.h
@@ -41,6 +41,8 @@
namespace WebCore {
+class ExecutionContext;
+
class AsyncCallStackTracker {
WTF_MAKE_NONCOPYABLE(AsyncCallStackTracker);
public:
@@ -71,13 +73,13 @@ public:
void setAsyncCallStackDepth(int);
const AsyncCallChain* currentAsyncCallChain() const;
- void didInstallTimer(int timerId, bool singleShot, const ScriptValue& callFrames);
- void didRemoveTimer(int timerId);
- void willFireTimer(int timerId);
+ void didInstallTimer(ExecutionContext*, int timerId, bool singleShot, const ScriptValue& callFrames);
+ void didRemoveTimer(ExecutionContext*, int timerId);
+ void willFireTimer(ExecutionContext*, int timerId);
- void didRequestAnimationFrame(int callbackId, const ScriptValue& callFrames);
- void didCancelAnimationFrame(int callbackId);
- void willFireAnimationFrame(int callbackId);
+ void didRequestAnimationFrame(ExecutionContext*, int callbackId, const ScriptValue& callFrames);
+ void didCancelAnimationFrame(ExecutionContext*, int callbackId);
+ void willFireAnimationFrame(ExecutionContext*, int callbackId);
void didFireAsyncCall();
void clear();
@@ -87,11 +89,13 @@ private:
static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned);
static bool validateCallFrames(const ScriptValue& callFrames);
+ class ExecutionContextData;
+ void contextDestroyed(ExecutionContext*);
+ ExecutionContextData* createContextDataIfNeeded(ExecutionContext*);
+
unsigned m_maxAsyncCallStackDepth;
RefPtr<AsyncCallChain> m_currentAsyncCallChain;
- HashSet<int> m_intervalTimerIds;
- HashMap<int, RefPtr<AsyncCallChain> > m_timerCallChains;
- HashMap<int, RefPtr<AsyncCallChain> > m_animationFrameCallChains;
+ HashMap<ExecutionContext*, ExecutionContextData*> m_executionContextDataMap;
};
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698