OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 #ifndef V8_INSPECTOR_V8DEBUGGER_H_ | 5 #ifndef V8_INSPECTOR_V8DEBUGGER_H_ |
6 #define V8_INSPECTOR_V8DEBUGGER_H_ | 6 #define V8_INSPECTOR_V8DEBUGGER_H_ |
7 | 7 |
8 #include <deque> | |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "src/base/macros.h" | 11 #include "src/base/macros.h" |
11 #include "src/debug/debug-interface.h" | 12 #include "src/debug/debug-interface.h" |
12 #include "src/inspector/java-script-call-frame.h" | 13 #include "src/inspector/java-script-call-frame.h" |
13 #include "src/inspector/protocol/Forward.h" | 14 #include "src/inspector/protocol/Forward.h" |
14 #include "src/inspector/protocol/Runtime.h" | 15 #include "src/inspector/protocol/Runtime.h" |
15 #include "src/inspector/v8-debugger-script.h" | 16 #include "src/inspector/v8-debugger-script.h" |
16 #include "src/inspector/wasm-translation.h" | 17 #include "src/inspector/wasm-translation.h" |
17 | 18 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 GENERATOR, | 129 GENERATOR, |
129 }; | 130 }; |
130 v8::MaybeLocal<v8::Value> getTargetScopes(v8::Local<v8::Context>, | 131 v8::MaybeLocal<v8::Value> getTargetScopes(v8::Local<v8::Context>, |
131 v8::Local<v8::Value>, | 132 v8::Local<v8::Value>, |
132 ScopeTargetKind); | 133 ScopeTargetKind); |
133 | 134 |
134 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>, | 135 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>, |
135 v8::Local<v8::Function>); | 136 v8::Local<v8::Function>); |
136 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>, | 137 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>, |
137 v8::Local<v8::Value>); | 138 v8::Local<v8::Value>); |
139 void cleanupScheduledOrderIfNeeded(); | |
138 | 140 |
139 v8::Isolate* m_isolate; | 141 v8::Isolate* m_isolate; |
140 V8InspectorImpl* m_inspector; | 142 V8InspectorImpl* m_inspector; |
141 int m_enableCount; | 143 int m_enableCount; |
142 bool m_breakpointsActivated; | 144 bool m_breakpointsActivated; |
143 v8::Global<v8::Object> m_debuggerScript; | 145 v8::Global<v8::Object> m_debuggerScript; |
144 v8::Global<v8::Context> m_debuggerContext; | 146 v8::Global<v8::Context> m_debuggerContext; |
145 v8::Local<v8::Object> m_executionState; | 147 v8::Local<v8::Object> m_executionState; |
146 v8::Local<v8::Context> m_pausedContext; | 148 v8::Local<v8::Context> m_pausedContext; |
147 bool m_runningNestedMessageLoop; | 149 bool m_runningNestedMessageLoop; |
148 int m_ignoreScriptParsedEventsCounter; | 150 int m_ignoreScriptParsedEventsCounter; |
149 | 151 |
150 using AsyncTaskToStackTrace = | 152 using AsyncTaskToStackTrace = |
151 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; | 153 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; |
152 AsyncTaskToStackTrace m_asyncTaskStacks; | 154 AsyncTaskToStackTrace m_asyncTaskStacks; |
155 std::deque<void*> m_scheduledOrder; | |
dgozman
2016/12/16 22:36:11
Can we instead have two maps: void* -> task_id, an
kozy
2016/12/16 22:56:15
Done.
| |
156 std::unordered_set<void*> m_scheduledOrderDeleted; | |
153 protocol::HashSet<void*> m_recurringTasks; | 157 protocol::HashSet<void*> m_recurringTasks; |
154 int m_maxAsyncCallStackDepth; | 158 int m_maxAsyncCallStackDepth; |
155 std::vector<void*> m_currentTasks; | 159 std::vector<void*> m_currentTasks; |
156 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; | 160 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; |
157 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 161 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
158 | 162 |
159 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 163 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
160 | 164 |
161 WasmTranslation m_wasmTranslation; | 165 WasmTranslation m_wasmTranslation; |
162 | 166 |
163 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 167 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
164 }; | 168 }; |
165 | 169 |
166 } // namespace v8_inspector | 170 } // namespace v8_inspector |
167 | 171 |
168 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 172 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
OLD | NEW |