Chromium Code Reviews| Index: Source/core/inspector/AsyncCallStackTracker.h |
| diff --git a/Source/core/inspector/AsyncCallStackTracker.h b/Source/core/inspector/AsyncCallStackTracker.h |
| index aa43d63d120bf52f864d30724edf96248a2ec183..a2b14161f8a3912acd1ccc1d80512c9cce2c6b6a 100644 |
| --- a/Source/core/inspector/AsyncCallStackTracker.h |
| +++ b/Source/core/inspector/AsyncCallStackTracker.h |
| @@ -32,7 +32,6 @@ |
| #define AsyncCallStackTracker_h |
| #include "bindings/core/v8/ScriptValue.h" |
| -#include "core/dom/ContextLifecycleObserver.h" |
| #include "wtf/Deque.h" |
| #include "wtf/HashMap.h" |
| #include "wtf/HashSet.h" |
| @@ -78,38 +77,6 @@ public: |
| AsyncCallStackVector m_callStacks; |
| }; |
| - class ExecutionContextData final : public NoBaseWillBeGarbageCollectedFinalized<ExecutionContextData>, public ContextLifecycleObserver { |
| - WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| - public: |
| - ExecutionContextData(AsyncCallStackTracker* tracker, ExecutionContext* executionContext) |
| - : ContextLifecycleObserver(executionContext) |
| - , m_circularSequentialID(0) |
| - , m_tracker(tracker) |
| - { |
| - } |
| - |
| - virtual void contextDestroyed() override; |
| - |
| - int circularSequentialID(); |
| - |
| - void trace(Visitor*); |
| - |
| - private: |
| - int m_circularSequentialID; |
| - |
| - public: |
| - RawPtrWillBeMember<AsyncCallStackTracker> m_tracker; |
| - HashSet<int> m_intervalTimerIds; |
| - WillBeHeapHashMap<int, RefPtrWillBeMember<AsyncCallChain> > m_timerCallChains; |
| - WillBeHeapHashMap<int, RefPtrWillBeMember<AsyncCallChain> > m_animationFrameCallChains; |
| - WillBeHeapHashMap<RawPtrWillBeMember<Event>, RefPtrWillBeMember<AsyncCallChain> > m_eventCallChains; |
| - WillBeHeapHashMap<RawPtrWillBeMember<EventTarget>, RefPtrWillBeMember<AsyncCallChain> > m_xhrCallChains; |
| - WillBeHeapHashMap<RawPtrWillBeMember<MutationObserver>, RefPtrWillBeMember<AsyncCallChain> > m_mutationObserverCallChains; |
| - WillBeHeapHashMap<ExecutionContextTask*, RefPtrWillBeMember<AsyncCallChain> > m_executionContextTaskCallChains; |
| - WillBeHeapHashMap<String, RefPtrWillBeMember<AsyncCallChain> > m_v8AsyncTaskCallChains; |
| - WillBeHeapHashMap<int, RefPtrWillBeMember<AsyncCallChain> > m_asyncOperationCallChains; |
| - }; |
| - |
| AsyncCallStackTracker(); |
| bool isEnabled() const { return m_maxAsyncCallStackDepth; } |
| @@ -161,12 +128,14 @@ private: |
| static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned); |
| bool validateCallFrames(const ScriptValue& callFrames); |
| + class ExecutionContextData; |
| ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); |
| unsigned m_maxAsyncCallStackDepth; |
| RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; |
| unsigned m_nestedAsyncCallCount; |
| - typedef WillBeHeapHashMap<RawPtrWillBeMember<ExecutionContext>, OwnPtrWillBeMember<ExecutionContextData> > ExecutionContextDataMap; |
| + // Cannot use OwnPtrWillBeMember<ExecutionContextData> w/o making ExecutionContextData a complete public type. |
|
yurys
2014/11/11 12:31:37
I guess adding explicit destructor and moving its
|
| + typedef WillBeHeapHashMap<RawPtrWillBeMember<ExecutionContext>, RawPtrWillBeMember<ExecutionContextData> > ExecutionContextDataMap; |
| ExecutionContextDataMap m_executionContextDataMap; |
| }; |