OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/inspector/v8/V8AsyncCallTracker.h" | 6 #include "core/inspector/v8/V8AsyncCallTracker.h" |
7 | 7 |
8 #include "bindings/core/v8/V8PerContextData.h" | 8 #include "bindings/core/v8/V8PerContextData.h" |
9 #include "core/inspector/AsyncOperationMap.h" | 9 #include "core/inspector/AsyncOperationMap.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 V8AsyncCallTracker::~V8AsyncCallTracker() | 68 V8AsyncCallTracker::~V8AsyncCallTracker() |
69 { | 69 { |
70 ASSERT(m_contextAsyncOperationMap.isEmpty()); | 70 ASSERT(m_contextAsyncOperationMap.isEmpty()); |
71 } | 71 } |
72 | 72 |
73 DEFINE_TRACE(V8AsyncCallTracker) | 73 DEFINE_TRACE(V8AsyncCallTracker) |
74 { | 74 { |
75 #if ENABLE(OILPAN) | 75 #if ENABLE(OILPAN) |
76 visitor->trace(m_contextAsyncOperationMap); | 76 visitor->trace(m_contextAsyncOperationMap); |
77 visitor->trace(m_debuggerAgent); | |
78 #endif | 77 #endif |
79 } | 78 } |
80 | 79 |
81 void V8AsyncCallTracker::asyncCallTrackingStateChanged(bool) | 80 void V8AsyncCallTracker::asyncCallTrackingStateChanged(bool) |
82 { | 81 { |
83 } | 82 } |
84 | 83 |
85 void V8AsyncCallTracker::resetAsyncOperations() | 84 void V8AsyncCallTracker::resetAsyncOperations() |
86 { | 85 { |
87 for (auto& it : m_contextAsyncOperationMap) { | 86 for (auto& it : m_contextAsyncOperationMap) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 if (V8ContextAsyncOperations* contextCallChains = m_contextAsyncOperationMap
.get(state)) { | 128 if (V8ContextAsyncOperations* contextCallChains = m_contextAsyncOperationMap
.get(state)) { |
130 String taskId = makeV8AsyncTaskUniqueId(eventName, id); | 129 String taskId = makeV8AsyncTaskUniqueId(eventName, id); |
131 m_debuggerAgent->traceAsyncCallbackStarting(contextCallChains->m_v8Async
Operations.get(taskId)); | 130 m_debuggerAgent->traceAsyncCallbackStarting(contextCallChains->m_v8Async
Operations.get(taskId)); |
132 contextCallChains->m_v8AsyncOperations.remove(taskId); | 131 contextCallChains->m_v8AsyncOperations.remove(taskId); |
133 } else { | 132 } else { |
134 m_debuggerAgent->traceAsyncCallbackStarting(V8DebuggerAgentImpl::unknown
AsyncOperationId); | 133 m_debuggerAgent->traceAsyncCallbackStarting(V8DebuggerAgentImpl::unknown
AsyncOperationId); |
135 } | 134 } |
136 } | 135 } |
137 | 136 |
138 } // namespace blink | 137 } // namespace blink |
OLD | NEW |