| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 namespace blink { | 43 namespace blink { |
| 44 | 44 |
| 45 class Event; | 45 class Event; |
| 46 class EventListener; | 46 class EventListener; |
| 47 class EventTarget; | 47 class EventTarget; |
| 48 class ExecutionContext; | 48 class ExecutionContext; |
| 49 class ExecutionContextTask; | 49 class ExecutionContextTask; |
| 50 class MutationObserver; | 50 class MutationObserver; |
| 51 class XMLHttpRequest; | 51 class XMLHttpRequest; |
| 52 | 52 |
| 53 class AsyncCallStackTracker FINAL : public NoBaseWillBeGarbageCollectedFinalized
<AsyncCallStackTracker> { | 53 class AsyncCallStackTracker final : public NoBaseWillBeGarbageCollectedFinalized
<AsyncCallStackTracker> { |
| 54 WTF_MAKE_NONCOPYABLE(AsyncCallStackTracker); | 54 WTF_MAKE_NONCOPYABLE(AsyncCallStackTracker); |
| 55 public: | 55 public: |
| 56 class AsyncCallStack FINAL : public RefCountedWillBeGarbageCollectedFinalize
d<AsyncCallStack> { | 56 class AsyncCallStack final : public RefCountedWillBeGarbageCollectedFinalize
d<AsyncCallStack> { |
| 57 public: | 57 public: |
| 58 AsyncCallStack(const String&, const ScriptValue&); | 58 AsyncCallStack(const String&, const ScriptValue&); |
| 59 ~AsyncCallStack(); | 59 ~AsyncCallStack(); |
| 60 void trace(Visitor*) { } | 60 void trace(Visitor*) { } |
| 61 String description() const { return m_description; } | 61 String description() const { return m_description; } |
| 62 ScriptValue callFrames() const { return m_callFrames; } | 62 ScriptValue callFrames() const { return m_callFrames; } |
| 63 private: | 63 private: |
| 64 String m_description; | 64 String m_description; |
| 65 ScriptValue m_callFrames; | 65 ScriptValue m_callFrames; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 typedef WillBeHeapDeque<RefPtrWillBeMember<AsyncCallStack>, 4> AsyncCallStac
kVector; | 68 typedef WillBeHeapDeque<RefPtrWillBeMember<AsyncCallStack>, 4> AsyncCallStac
kVector; |
| 69 | 69 |
| 70 class AsyncCallChain FINAL : public RefCountedWillBeGarbageCollected<AsyncCa
llChain> { | 70 class AsyncCallChain final : public RefCountedWillBeGarbageCollected<AsyncCa
llChain> { |
| 71 public: | 71 public: |
| 72 AsyncCallChain() { } | 72 AsyncCallChain() { } |
| 73 AsyncCallChain(const AsyncCallChain& t) : m_callStacks(t.m_callStacks) {
} | 73 AsyncCallChain(const AsyncCallChain& t) : m_callStacks(t.m_callStacks) {
} |
| 74 AsyncCallStackVector callStacks() const { return m_callStacks; } | 74 AsyncCallStackVector callStacks() const { return m_callStacks; } |
| 75 void trace(Visitor*); | 75 void trace(Visitor*); |
| 76 private: | 76 private: |
| 77 friend class AsyncCallStackTracker; | 77 friend class AsyncCallStackTracker; |
| 78 AsyncCallStackVector m_callStacks; | 78 AsyncCallStackVector m_callStacks; |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 class ExecutionContextData FINAL : public NoBaseWillBeGarbageCollectedFinali
zed<ExecutionContextData>, public ContextLifecycleObserver { | 81 class ExecutionContextData final : public NoBaseWillBeGarbageCollectedFinali
zed<ExecutionContextData>, public ContextLifecycleObserver { |
| 82 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 82 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 83 public: | 83 public: |
| 84 ExecutionContextData(AsyncCallStackTracker* tracker, ExecutionContext* e
xecutionContext) | 84 ExecutionContextData(AsyncCallStackTracker* tracker, ExecutionContext* e
xecutionContext) |
| 85 : ContextLifecycleObserver(executionContext) | 85 : ContextLifecycleObserver(executionContext) |
| 86 , m_circularSequentialID(0) | 86 , m_circularSequentialID(0) |
| 87 , m_tracker(tracker) | 87 , m_tracker(tracker) |
| 88 { | 88 { |
| 89 } | 89 } |
| 90 | 90 |
| 91 virtual void contextDestroyed() OVERRIDE; | 91 virtual void contextDestroyed() override; |
| 92 | 92 |
| 93 int circularSequentialID(); | 93 int circularSequentialID(); |
| 94 | 94 |
| 95 void trace(Visitor*); | 95 void trace(Visitor*); |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 int m_circularSequentialID; | 98 int m_circularSequentialID; |
| 99 | 99 |
| 100 public: | 100 public: |
| 101 RawPtrWillBeMember<AsyncCallStackTracker> m_tracker; | 101 RawPtrWillBeMember<AsyncCallStackTracker> m_tracker; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 unsigned m_maxAsyncCallStackDepth; | 166 unsigned m_maxAsyncCallStackDepth; |
| 167 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; | 167 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; |
| 168 unsigned m_nestedAsyncCallCount; | 168 unsigned m_nestedAsyncCallCount; |
| 169 typedef WillBeHeapHashMap<RawPtrWillBeMember<ExecutionContext>, OwnPtrWillBe
Member<ExecutionContextData> > ExecutionContextDataMap; | 169 typedef WillBeHeapHashMap<RawPtrWillBeMember<ExecutionContext>, OwnPtrWillBe
Member<ExecutionContextData> > ExecutionContextDataMap; |
| 170 ExecutionContextDataMap m_executionContextDataMap; | 170 ExecutionContextDataMap m_executionContextDataMap; |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 } // namespace blink | 173 } // namespace blink |
| 174 | 174 |
| 175 #endif // !defined(AsyncCallStackTracker_h) | 175 #endif // !defined(AsyncCallStackTracker_h) |
| OLD | NEW |