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 <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 v8::Local<v8::Context> m_pausedContext; | 182 v8::Local<v8::Context> m_pausedContext; |
183 bool m_runningNestedMessageLoop; | 183 bool m_runningNestedMessageLoop; |
184 int m_ignoreScriptParsedEventsCounter; | 184 int m_ignoreScriptParsedEventsCounter; |
185 bool m_scheduledOOMBreak = false; | 185 bool m_scheduledOOMBreak = false; |
186 int m_targetContextGroupId = 0; | 186 int m_targetContextGroupId = 0; |
187 | 187 |
188 using AsyncTaskToStackTrace = | 188 using AsyncTaskToStackTrace = |
189 protocol::HashMap<void*, std::weak_ptr<AsyncStackTrace>>; | 189 protocol::HashMap<void*, std::weak_ptr<AsyncStackTrace>>; |
190 AsyncTaskToStackTrace m_asyncTaskStacks; | 190 AsyncTaskToStackTrace m_asyncTaskStacks; |
191 AsyncTaskToStackTrace m_asyncTaskCreationStacks; | 191 AsyncTaskToStackTrace m_asyncTaskCreationStacks; |
| 192 protocol::HashSet<void*> m_recurringTasks; |
| 193 protocol::HashMap<void*, void*> m_parentTask; |
| 194 |
192 int m_maxAsyncCallStacks; | 195 int m_maxAsyncCallStacks; |
193 protocol::HashSet<void*> m_recurringTasks; | |
194 int m_maxAsyncCallStackDepth; | 196 int m_maxAsyncCallStackDepth; |
195 | 197 |
196 std::vector<void*> m_currentTasks; | 198 std::vector<void*> m_currentTasks; |
197 std::vector<std::shared_ptr<AsyncStackTrace>> m_currentAsyncParent; | 199 std::vector<std::shared_ptr<AsyncStackTrace>> m_currentAsyncParent; |
198 std::vector<std::shared_ptr<AsyncStackTrace>> m_currentAsyncCreation; | 200 std::vector<std::shared_ptr<AsyncStackTrace>> m_currentAsyncCreation; |
199 | 201 |
200 void collectOldAsyncStacksIfNeeded(); | 202 void collectOldAsyncStacksIfNeeded(); |
201 void removeOldAsyncTasks(AsyncTaskToStackTrace& map); | 203 void removeOldAsyncTasks(AsyncTaskToStackTrace& map); |
202 int m_asyncStacksCount = 0; | 204 int m_asyncStacksCount = 0; |
203 // V8Debugger owns all the async stacks, while most of the other references | 205 // V8Debugger owns all the async stacks, while most of the other references |
204 // are weak, which allows to collect some stacks when there are too many. | 206 // are weak, which allows to collect some stacks when there are too many. |
205 std::list<std::shared_ptr<AsyncStackTrace>> m_allAsyncStacks; | 207 std::list<std::shared_ptr<AsyncStackTrace>> m_allAsyncStacks; |
206 std::map<int, std::weak_ptr<StackFrame>> m_framesCache; | 208 std::map<int, std::weak_ptr<StackFrame>> m_framesCache; |
207 | 209 |
208 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 210 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
209 protocol::HashMap<void*, void*> m_parentTask; | |
210 protocol::HashMap<void*, void*> m_firstNextTask; | |
211 void* m_taskWithScheduledBreak = nullptr; | 211 void* m_taskWithScheduledBreak = nullptr; |
212 | 212 |
213 std::unique_ptr<ScheduleStepIntoAsyncCallback> m_stepIntoAsyncCallback; | 213 std::unique_ptr<ScheduleStepIntoAsyncCallback> m_stepIntoAsyncCallback; |
214 bool m_breakRequested = false; | 214 bool m_breakRequested = false; |
215 | 215 |
216 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 216 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
217 | 217 |
218 WasmTranslation m_wasmTranslation; | 218 WasmTranslation m_wasmTranslation; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 220 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace v8_inspector | 223 } // namespace v8_inspector |
224 | 224 |
225 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 225 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
OLD | NEW |