| 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 AsyncCallStackTracker::AsyncCallStackTracker(InspectorDebuggerAgent* debuggerAge
nt, InstrumentingAgents* instrumentingAgents) | 145 AsyncCallStackTracker::AsyncCallStackTracker(InspectorDebuggerAgent* debuggerAge
nt, InstrumentingAgents* 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(AsyncCallStackTracker); | 152 AsyncCallStackTracker::~AsyncCallStackTracker() |
| 153 { |
| 154 } |
| 153 | 155 |
| 154 void AsyncCallStackTracker::asyncCallTrackingStateChanged(bool tracking) | 156 void AsyncCallStackTracker::asyncCallTrackingStateChanged(bool tracking) |
| 155 { | 157 { |
| 156 m_instrumentingAgents->setAsyncCallStackTracker(tracking ? this : nullptr); | 158 m_instrumentingAgents->setAsyncCallStackTracker(tracking ? this : nullptr); |
| 157 } | 159 } |
| 158 | 160 |
| 159 void AsyncCallStackTracker::resetAsyncCallChains() | 161 void AsyncCallStackTracker::resetAsyncCallChains() |
| 160 { | 162 { |
| 161 for (auto& it : m_executionContextDataMap) | 163 for (auto& it : m_executionContextDataMap) |
| 162 it.value->dispose(); | 164 it.value->dispose(); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 data = m_executionContextDataMap.set(context, adoptPtrWillBeNoop(new Asy
ncCallStackTracker::ExecutionContextData(this, context))) | 435 data = m_executionContextDataMap.set(context, adoptPtrWillBeNoop(new Asy
ncCallStackTracker::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 AsyncCallStackTracker::trace(Visitor* visitor) | 441 void AsyncCallStackTracker::trace(Visitor* visitor) |
| 440 { | 442 { |
| 441 #if ENABLE(OILPAN) | 443 #if ENABLE(OILPAN) |
| 442 visitor->trace(m_executionContextDataMap); | 444 visitor->trace(m_executionContextDataMap); |
| 445 visitor->trace(m_debuggerAgent); |
| 446 visitor->trace(m_instrumentingAgents); |
| 443 #endif | 447 #endif |
| 448 InspectorDebuggerAgent::AsyncCallTrackingListener::trace(visitor); |
| 444 } | 449 } |
| 445 | 450 |
| 446 } // namespace blink | 451 } // namespace blink |
| OLD | NEW |