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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 return 0; | 142 return 0; |
143 } | 143 } |
144 | 144 |
145 AsyncCallTracker::AsyncCallTracker(InspectorDebuggerAgent* debuggerAgent, Instru
mentingAgents* instrumentingAgents) | 145 AsyncCallTracker::AsyncCallTracker(InspectorDebuggerAgent* debuggerAgent, Instru
mentingAgents* instrumentingAgents) |
146 : m_debuggerAgent(debuggerAgent) | 146 : m_debuggerAgent(debuggerAgent) |
147 , m_instrumentingAgents(instrumentingAgents) | 147 , m_instrumentingAgents(instrumentingAgents) |
148 { | 148 { |
149 m_debuggerAgent->addAsyncCallTrackingListener(this); | 149 m_debuggerAgent->addAsyncCallTrackingListener(this); |
150 } | 150 } |
151 | 151 |
152 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(AsyncCallTracker); | 152 AsyncCallTracker::~AsyncCallTracker() |
| 153 { |
| 154 } |
153 | 155 |
154 void AsyncCallTracker::asyncCallTrackingStateChanged(bool tracking) | 156 void AsyncCallTracker::asyncCallTrackingStateChanged(bool tracking) |
155 { | 157 { |
156 m_instrumentingAgents->setAsyncCallTracker(tracking ? this : nullptr); | 158 m_instrumentingAgents->setAsyncCallTracker(tracking ? this : nullptr); |
157 } | 159 } |
158 | 160 |
159 void AsyncCallTracker::resetAsyncCallChains() | 161 void AsyncCallTracker::resetAsyncCallChains() |
160 { | 162 { |
161 for (auto& it : m_executionContextDataMap) | 163 for (auto& it : m_executionContextDataMap) |
162 it.value->dispose(); | 164 it.value->dispose(); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 ExecutionContextData* data = m_executionContextDataMap.get(context); | 433 ExecutionContextData* data = m_executionContextDataMap.get(context); |
432 if (!data) { | 434 if (!data) { |
433 data = m_executionContextDataMap.set(context, adoptPtrWillBeNoop(new Asy
ncCallTracker::ExecutionContextData(this, context))) | 435 data = m_executionContextDataMap.set(context, adoptPtrWillBeNoop(new Asy
ncCallTracker::ExecutionContextData(this, context))) |
434 .storedValue->value.get(); | 436 .storedValue->value.get(); |
435 } | 437 } |
436 return data; | 438 return data; |
437 } | 439 } |
438 | 440 |
439 void AsyncCallTracker::trace(Visitor* visitor) | 441 void AsyncCallTracker::trace(Visitor* visitor) |
440 { | 442 { |
441 InspectorDebuggerAgent::AsyncCallTrackingListener::trace(visitor); | |
442 #if ENABLE(OILPAN) | 443 #if ENABLE(OILPAN) |
443 visitor->trace(m_executionContextDataMap); | 444 visitor->trace(m_executionContextDataMap); |
| 445 visitor->trace(m_debuggerAgent); |
| 446 visitor->trace(m_instrumentingAgents); |
444 #endif | 447 #endif |
| 448 InspectorDebuggerAgent::AsyncCallTrackingListener::trace(visitor); |
445 } | 449 } |
446 | 450 |
447 } // namespace blink | 451 } // namespace blink |
OLD | NEW |