| 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 13 matching lines...) Expand all Loading... |
| 24 class V8InspectorImpl; | 24 class V8InspectorImpl; |
| 25 class V8StackTraceImpl; | 25 class V8StackTraceImpl; |
| 26 | 26 |
| 27 using protocol::Response; | 27 using protocol::Response; |
| 28 | 28 |
| 29 class V8Debugger { | 29 class V8Debugger { |
| 30 public: | 30 public: |
| 31 V8Debugger(v8::Isolate*, V8InspectorImpl*); | 31 V8Debugger(v8::Isolate*, V8InspectorImpl*); |
| 32 ~V8Debugger(); | 32 ~V8Debugger(); |
| 33 | 33 |
| 34 static int contextId(v8::Local<v8::Context>); | |
| 35 static int getGroupId(v8::Local<v8::Context>); | |
| 36 int markContext(const V8ContextInfo&); | |
| 37 | |
| 38 bool enabled() const; | 34 bool enabled() const; |
| 39 | 35 |
| 40 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber, | 36 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber, |
| 41 int* actualColumnNumber); | 37 int* actualColumnNumber); |
| 42 void removeBreakpoint(const String16& breakpointId); | 38 void removeBreakpoint(const String16& breakpointId); |
| 43 void setBreakpointsActivated(bool); | 39 void setBreakpointsActivated(bool); |
| 44 bool breakpointsActivated() const { return m_breakpointsActivated; } | 40 bool breakpointsActivated() const { return m_breakpointsActivated; } |
| 45 | 41 |
| 46 v8::debug::ExceptionBreakState getPauseOnExceptionsState(); | 42 v8::debug::ExceptionBreakState getPauseOnExceptionsState(); |
| 47 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState); | 43 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 v8::Local<v8::Value>, | 131 v8::Local<v8::Value>, |
| 136 ScopeTargetKind); | 132 ScopeTargetKind); |
| 137 | 133 |
| 138 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>, | 134 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Context>, |
| 139 v8::Local<v8::Function>); | 135 v8::Local<v8::Function>); |
| 140 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>, | 136 v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>, |
| 141 v8::Local<v8::Value>); | 137 v8::Local<v8::Value>); |
| 142 | 138 |
| 143 v8::Isolate* m_isolate; | 139 v8::Isolate* m_isolate; |
| 144 V8InspectorImpl* m_inspector; | 140 V8InspectorImpl* m_inspector; |
| 145 int m_lastContextId; | |
| 146 int m_enableCount; | 141 int m_enableCount; |
| 147 bool m_breakpointsActivated; | 142 bool m_breakpointsActivated; |
| 148 v8::Global<v8::Object> m_debuggerScript; | 143 v8::Global<v8::Object> m_debuggerScript; |
| 149 v8::Global<v8::Context> m_debuggerContext; | 144 v8::Global<v8::Context> m_debuggerContext; |
| 150 v8::Local<v8::Object> m_executionState; | 145 v8::Local<v8::Object> m_executionState; |
| 151 v8::Local<v8::Context> m_pausedContext; | 146 v8::Local<v8::Context> m_pausedContext; |
| 152 bool m_runningNestedMessageLoop; | 147 bool m_runningNestedMessageLoop; |
| 153 int m_ignoreScriptParsedEventsCounter; | 148 int m_ignoreScriptParsedEventsCounter; |
| 154 | 149 |
| 155 using AsyncTaskToStackTrace = | 150 using AsyncTaskToStackTrace = |
| 156 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; | 151 protocol::HashMap<void*, std::unique_ptr<V8StackTraceImpl>>; |
| 157 AsyncTaskToStackTrace m_asyncTaskStacks; | 152 AsyncTaskToStackTrace m_asyncTaskStacks; |
| 158 protocol::HashSet<void*> m_recurringTasks; | 153 protocol::HashSet<void*> m_recurringTasks; |
| 159 int m_maxAsyncCallStackDepth; | 154 int m_maxAsyncCallStackDepth; |
| 160 std::vector<void*> m_currentTasks; | 155 std::vector<void*> m_currentTasks; |
| 161 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; | 156 std::vector<std::unique_ptr<V8StackTraceImpl>> m_currentStacks; |
| 162 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; | 157 protocol::HashMap<V8DebuggerAgentImpl*, int> m_maxAsyncCallStackDepthMap; |
| 163 | 158 |
| 164 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 159 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
| 165 | 160 |
| 166 WasmTranslation m_wasmTranslation; | 161 WasmTranslation m_wasmTranslation; |
| 167 | 162 |
| 168 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 163 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
| 169 }; | 164 }; |
| 170 | 165 |
| 171 } // namespace v8_inspector | 166 } // namespace v8_inspector |
| 172 | 167 |
| 173 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 168 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
| OLD | NEW |