| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 class ExecutionContext; | 46 class ExecutionContext; |
| 47 class ExecutionContextTask; | 47 class ExecutionContextTask; |
| 48 class FormData; | 48 class FormData; |
| 49 class HTTPHeaderMap; | 49 class HTTPHeaderMap; |
| 50 class InspectorDebuggerAgent; | 50 class InspectorDebuggerAgent; |
| 51 class KURL; | 51 class KURL; |
| 52 class MutationObserver; | 52 class MutationObserver; |
| 53 class ThreadableLoaderClient; | 53 class ThreadableLoaderClient; |
| 54 class XMLHttpRequest; | 54 class XMLHttpRequest; |
| 55 | 55 |
| 56 class AsyncCallTracker final : public NoBaseWillBeGarbageCollected<AsyncCallTrac
ker>, public InspectorDebuggerAgent::AsyncCallTrackingListener { | 56 class AsyncCallTracker final : public NoBaseWillBeGarbageCollectedFinalized<Asyn
cCallTracker>, public InspectorDebuggerAgent::AsyncCallTrackingListener { |
| 57 WTF_MAKE_NONCOPYABLE(AsyncCallTracker); | 57 WTF_MAKE_NONCOPYABLE(AsyncCallTracker); |
| 58 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(AsyncCallTracker); | 58 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AsyncCallTracker); |
| 59 public: | 59 public: |
| 60 AsyncCallTracker(InspectorDebuggerAgent*, InstrumentingAgents*); | 60 AsyncCallTracker(InspectorDebuggerAgent*, InstrumentingAgents*); |
| 61 virtual ~AsyncCallTracker(); |
| 61 | 62 |
| 62 // InspectorDebuggerAgent::AsyncCallTrackingListener implementation: | 63 // InspectorDebuggerAgent::AsyncCallTrackingListener implementation: |
| 63 void asyncCallTrackingStateChanged(bool tracking) override; | 64 void asyncCallTrackingStateChanged(bool tracking) override; |
| 64 void resetAsyncCallChains() override; | 65 void resetAsyncCallChains() override; |
| 65 | 66 |
| 66 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl
eShot); | 67 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl
eShot); |
| 67 void didRemoveTimer(ExecutionContext*, int timerId); | 68 void didRemoveTimer(ExecutionContext*, int timerId); |
| 68 bool willFireTimer(ExecutionContext*, int timerId); | 69 bool willFireTimer(ExecutionContext*, int timerId); |
| 69 void didFireTimer() { didFireAsyncCall(); }; | 70 void didFireTimer() { didFireAsyncCall(); }; |
| 70 | 71 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 private: | 105 private: |
| 105 void willHandleXHREvent(XMLHttpRequest*, Event*); | 106 void willHandleXHREvent(XMLHttpRequest*, Event*); |
| 106 | 107 |
| 107 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtrWillBeRawPtr<Asyn
cCallChain>); | 108 void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtrWillBeRawPtr<Asyn
cCallChain>); |
| 108 void didFireAsyncCall(); | 109 void didFireAsyncCall(); |
| 109 | 110 |
| 110 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); | 111 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); |
| 111 | 112 |
| 112 using ExecutionContextDataMap = WillBeHeapHashMap<RawPtrWillBeMember<Executi
onContext>, OwnPtrWillBeMember<ExecutionContextData>>; | 113 using ExecutionContextDataMap = WillBeHeapHashMap<RawPtrWillBeMember<Executi
onContext>, OwnPtrWillBeMember<ExecutionContextData>>; |
| 113 ExecutionContextDataMap m_executionContextDataMap; | 114 ExecutionContextDataMap m_executionContextDataMap; |
| 114 InspectorDebuggerAgent* m_debuggerAgent; | 115 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; |
| 115 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; | 116 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; |
| 116 }; | 117 }; |
| 117 | 118 |
| 118 } // namespace blink | 119 } // namespace blink |
| 119 | 120 |
| 120 #endif // AsyncCallTracker_h | 121 #endif // AsyncCallTracker_h |
| OLD | NEW |