| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 AsyncCallStack(const String&, const ScriptValue&); | 63 AsyncCallStack(const String&, const ScriptValue&); |
| 64 ~AsyncCallStack(); | 64 ~AsyncCallStack(); |
| 65 void trace(Visitor*) { } | 65 void trace(Visitor*) { } |
| 66 String description() const { return m_description; } | 66 String description() const { return m_description; } |
| 67 ScriptValue callFrames() const { return m_callFrames; } | 67 ScriptValue callFrames() const { return m_callFrames; } |
| 68 private: | 68 private: |
| 69 String m_description; | 69 String m_description; |
| 70 ScriptValue m_callFrames; | 70 ScriptValue m_callFrames; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 typedef WillBeHeapDeque<RefPtrWillBeMember<AsyncCallStack>, 4> AsyncCallStac
kVector; | 73 using AsyncCallStackVector = WillBeHeapDeque<RefPtrWillBeMember<AsyncCallSta
ck>, 4>; |
| 74 | 74 |
| 75 class AsyncCallChain final : public RefCountedWillBeGarbageCollectedFinalize
d<AsyncCallChain> { | 75 class AsyncCallChain final : public RefCountedWillBeGarbageCollectedFinalize
d<AsyncCallChain> { |
| 76 public: | 76 public: |
| 77 AsyncCallChain() { } | 77 AsyncCallChain() { } |
| 78 explicit AsyncCallChain(const AsyncCallChain& t) : m_callStacks(t.m_call
Stacks) { } | 78 explicit AsyncCallChain(const AsyncCallChain& t) : m_callStacks(t.m_call
Stacks) { } |
| 79 AsyncCallStackVector callStacks() const { return m_callStacks; } | 79 AsyncCallStackVector callStacks() const { return m_callStacks; } |
| 80 void trace(Visitor*); | 80 void trace(Visitor*); |
| 81 private: | 81 private: |
| 82 friend class AsyncCallStackTracker; | 82 friend class AsyncCallStackTracker; |
| 83 AsyncCallStackVector m_callStacks; | 83 AsyncCallStackVector m_callStacks; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtrWillBeRawPtr<Asyn
cCallChain>); | 152 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtrWillBeRawPtr<Asyn
cCallChain>); |
| 153 void clearCurrentAsyncCallChain(); | 153 void clearCurrentAsyncCallChain(); |
| 154 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned); | 154 static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned); |
| 155 bool validateCallFrames(const ScriptValue& callFrames); | 155 bool validateCallFrames(const ScriptValue& callFrames); |
| 156 | 156 |
| 157 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); | 157 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); |
| 158 | 158 |
| 159 unsigned m_maxAsyncCallStackDepth; | 159 unsigned m_maxAsyncCallStackDepth; |
| 160 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; | 160 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; |
| 161 unsigned m_nestedAsyncCallCount; | 161 unsigned m_nestedAsyncCallCount; |
| 162 typedef WillBeHeapHashMap<RawPtrWillBeMember<ExecutionContext>, OwnPtrWillBe
Member<ExecutionContextData> > ExecutionContextDataMap; | 162 |
| 163 using ExecutionContextDataMap = WillBeHeapHashMap<RawPtrWillBeMember<Executi
onContext>, OwnPtrWillBeMember<ExecutionContextData>>; |
| 163 ExecutionContextDataMap m_executionContextDataMap; | 164 ExecutionContextDataMap m_executionContextDataMap; |
| 165 |
| 164 Listener* m_listener; | 166 Listener* m_listener; |
| 165 ScriptDebugServer* m_scriptDebugServer; | 167 ScriptDebugServer* m_scriptDebugServer; |
| 166 }; | 168 }; |
| 167 | 169 |
| 168 } // namespace blink | 170 } // namespace blink |
| 169 | 171 |
| 170 #endif // !defined(AsyncCallStackTracker_h) | 172 #endif // !defined(AsyncCallStackTracker_h) |
| OLD | NEW |