| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/base/macros.h" | 10 #include "src/base/macros.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>, | 124 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>, |
| 125 v8::Local<v8::Function>); | 125 v8::Local<v8::Function>); |
| 126 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>, | 126 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>, |
| 127 v8::Local<v8::Value>); | 127 v8::Local<v8::Value>); |
| 128 | 128 |
| 129 void asyncTaskCreated(void* task, void* parentTask); | 129 void asyncTaskCreated(void* task, void* parentTask); |
| 130 void registerAsyncTaskIfNeeded(void* task); | 130 void registerAsyncTaskIfNeeded(void* task); |
| 131 | 131 |
| 132 // v8::debug::DebugEventListener implementation. | 132 // v8::debug::DebugEventListener implementation. |
| 133 void PromiseEventOccurred(v8::debug::PromiseDebugActionType type, int id, | 133 void PromiseEventOccurred(v8::Local<v8::Context> context, |
| 134 int parentId) override; | 134 v8::debug::PromiseDebugActionType type, int id, |
| 135 int parentId, bool createdByUser) override; |
| 135 void ScriptCompiled(v8::Local<v8::debug::Script> script, | 136 void ScriptCompiled(v8::Local<v8::debug::Script> script, |
| 136 bool has_compile_error) override; | 137 bool has_compile_error) override; |
| 137 void BreakProgramRequested(v8::Local<v8::Context> paused_context, | 138 void BreakProgramRequested(v8::Local<v8::Context> paused_context, |
| 138 v8::Local<v8::Object> exec_state, | 139 v8::Local<v8::Object> exec_state, |
| 139 v8::Local<v8::Value> break_points_hit) override; | 140 v8::Local<v8::Value> break_points_hit) override; |
| 140 void ExceptionThrown(v8::Local<v8::Context> paused_context, | 141 void ExceptionThrown(v8::Local<v8::Context> paused_context, |
| 141 v8::Local<v8::Object> exec_state, | 142 v8::Local<v8::Object> exec_state, |
| 142 v8::Local<v8::Value> exception, | 143 v8::Local<v8::Value> exception, |
| 143 v8::Local<v8::Value> promise, bool is_uncaught) override; | 144 v8::Local<v8::Value> promise, bool is_uncaught) override; |
| 144 bool IsFunctionBlackboxed(v8::Local<v8::debug::Script> script, | 145 bool IsFunctionBlackboxed(v8::Local<v8::debug::Script> script, |
| 145 const v8::debug::Location& start, | 146 const v8::debug::Location& start, |
| 146 const v8::debug::Location& end) override; | 147 const v8::debug::Location& end) override; |
| 147 | 148 |
| 149 int currentContextGroupId(); |
| 150 void handleAsyncTaskStepping(v8::Local<v8::Context> context, |
| 151 v8::debug::PromiseDebugActionType type, |
| 152 void* task, void* parentTask, |
| 153 bool createdByUser); |
| 154 |
| 148 v8::Isolate* m_isolate; | 155 v8::Isolate* m_isolate; |
| 149 V8InspectorImpl* m_inspector; | 156 V8InspectorImpl* m_inspector; |
| 150 int m_enableCount; | 157 int m_enableCount; |
| 151 bool m_breakpointsActivated; | 158 bool m_breakpointsActivated; |
| 152 v8::Global<v8::Object> m_debuggerScript; | 159 v8::Global<v8::Object> m_debuggerScript; |
| 153 v8::Global<v8::Context> m_debuggerContext; | 160 v8::Global<v8::Context> m_debuggerContext; |
| 154 v8::Local<v8::Object> m_executionState; | 161 v8::Local<v8::Object> m_executionState; |
| 155 v8::Local<v8::Context> m_pausedContext; | 162 v8::Local<v8::Context> m_pausedContext; |
| 156 bool m_runningNestedMessageLoop; | 163 bool m_runningNestedMessageLoop; |
| 157 int m_ignoreScriptParsedEventsCounter; | 164 int m_ignoreScriptParsedEventsCounter; |
| 158 bool m_scheduledOOMBreak = false; | 165 bool m_scheduledOOMBreak = false; |
| 159 | 166 |
| 160 using AsyncTaskToStackTrace = | 167 using AsyncTaskToStackTrace = |
| 161 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; | 168 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; |
| 162 AsyncTaskToStackTrace m_asyncTaskStacks; | 169 AsyncTaskToStackTrace m_asyncTaskStacks; |
| 163 AsyncTaskToStackTrace m_asyncTaskCreationStacks; | 170 AsyncTaskToStackTrace m_asyncTaskCreationStacks; |
| 164 int m_maxAsyncCallStacks; | 171 int m_maxAsyncCallStacks; |
| 165 std::map<int, void*> m_idToTask; | 172 std::map<int, void*> m_idToTask; |
| 166 std::unordered_map<void*, int> m_taskToId; | 173 std::unordered_map<void*, int> m_taskToId; |
| 167 int m_lastTaskId; | 174 int m_lastTaskId; |
| 168 protocol::HashSet<void*> m_recurringTasks; | 175 protocol::HashSet<void*> m_recurringTasks; |
| 169 int m_maxAsyncCallStackDepth; | 176 int m_maxAsyncCallStackDepth; |
| 170 std::vector<void*> m_currentTasks; | 177 std::vector<void*> m_currentTasks; |
| 171 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; | 178 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; |
| 172 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 179 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
| 173 protocol::HashMap<void*, void*> m_parentTask; | 180 protocol::HashMap<void*, void*> m_parentTask; |
| 181 protocol::HashMap<void*, void*> m_firstNextTask; |
| 182 void* m_taskWithScheduledBreak = nullptr; |
| 174 | 183 |
| 175 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 184 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
| 176 | 185 |
| 177 WasmTranslation m_wasmTranslation; | 186 WasmTranslation m_wasmTranslation; |
| 178 | 187 |
| 179 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 188 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
| 180 }; | 189 }; |
| 181 | 190 |
| 182 } // namespace v8_inspector | 191 } // namespace v8_inspector |
| 183 | 192 |
| 184 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 193 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
| OLD | NEW |