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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber, | 44 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber, |
45 int* actualColumnNumber); | 45 int* actualColumnNumber); |
46 void removeBreakpoint(const String16& breakpointId); | 46 void removeBreakpoint(const String16& breakpointId); |
47 void setBreakpointsActivated(bool); | 47 void setBreakpointsActivated(bool); |
48 bool breakpointsActivated() const { return m_breakpointsActivated; } | 48 bool breakpointsActivated() const { return m_breakpointsActivated; } |
49 | 49 |
50 v8::debug::ExceptionBreakState getPauseOnExceptionsState(); | 50 v8::debug::ExceptionBreakState getPauseOnExceptionsState(); |
51 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState); | 51 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState); |
52 bool canBreakProgram(); | 52 bool canBreakProgram(); |
53 void breakProgram(); | 53 void breakProgram(); |
54 void continueProgram(); | 54 void continueProgram(int targetContextGroupId); |
55 | 55 |
56 void setPauseOnNextStatement(bool, int targetContextGroupId); | 56 void setPauseOnNextStatement(bool, int targetContextGroupId); |
57 void stepIntoStatement(int targetContextGroupId); | 57 void stepIntoStatement(int targetContextGroupId); |
58 void stepOverStatement(int targetContextGroupId); | 58 void stepOverStatement(int targetContextGroupId); |
59 void stepOutOfFunction(int targetContextGroupId); | 59 void stepOutOfFunction(int targetContextGroupId); |
60 void scheduleStepIntoAsync( | 60 void scheduleStepIntoAsync( |
61 std::unique_ptr<ScheduleStepIntoAsyncCallback> callback, | 61 std::unique_ptr<ScheduleStepIntoAsyncCallback> callback, |
62 int targetContextGroupId); | 62 int targetContextGroupId); |
63 | 63 |
64 Response setScriptSource( | 64 Response setScriptSource( |
65 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun, | 65 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun, |
66 protocol::Maybe<protocol::Runtime::ExceptionDetails>*, | 66 protocol::Maybe<protocol::Runtime::ExceptionDetails>*, |
67 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged, | 67 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged, |
68 bool* compileError); | 68 bool* compileError); |
69 JavaScriptCallFrames currentCallFrames(int limit = 0); | 69 JavaScriptCallFrames currentCallFrames(int limit = 0); |
70 | 70 |
71 // Each script inherits debug data from v8::Context where it has been | 71 // Each script inherits debug data from v8::Context where it has been |
72 // compiled. | 72 // compiled. |
73 // Only scripts whose debug data matches |contextGroupId| will be reported. | 73 // Only scripts whose debug data matches |contextGroupId| will be reported. |
74 // Passing 0 will result in reporting all scripts. | 74 // Passing 0 will result in reporting all scripts. |
75 void getCompiledScripts(int contextGroupId, | 75 void getCompiledScripts(int contextGroupId, |
76 std::vector<std::unique_ptr<V8DebuggerScript>>&); | 76 std::vector<std::unique_ptr<V8DebuggerScript>>&); |
77 void enable(); | 77 void enable(); |
78 void disable(); | 78 void disable(); |
79 | 79 |
80 bool isPaused() const { return m_runningNestedMessageLoop; } | 80 bool isPaused() const { return m_pausedContextGroupId; } |
81 v8::Local<v8::Context> pausedContext() { return m_pausedContext; } | 81 v8::Local<v8::Context> pausedContext() { return m_pausedContext; } |
82 | 82 |
83 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } | 83 int maxAsyncCallChainDepth() { return m_maxAsyncCallStackDepth; } |
84 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int); | 84 void setAsyncCallStackDepth(V8DebuggerAgentImpl*, int); |
85 | 85 |
86 std::shared_ptr<AsyncStackTrace> currentAsyncParent(); | 86 std::shared_ptr<AsyncStackTrace> currentAsyncParent(); |
87 std::shared_ptr<AsyncStackTrace> currentAsyncCreation(); | 87 std::shared_ptr<AsyncStackTrace> currentAsyncCreation(); |
88 | 88 |
89 std::shared_ptr<StackFrame> symbolize(v8::Local<v8::StackFrame> v8Frame); | 89 std::shared_ptr<StackFrame> symbolize(v8::Local<v8::StackFrame> v8Frame); |
90 | 90 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 int currentContextGroupId(); | 173 int currentContextGroupId(); |
174 | 174 |
175 v8::Isolate* m_isolate; | 175 v8::Isolate* m_isolate; |
176 V8InspectorImpl* m_inspector; | 176 V8InspectorImpl* m_inspector; |
177 int m_enableCount; | 177 int m_enableCount; |
178 bool m_breakpointsActivated; | 178 bool m_breakpointsActivated; |
179 v8::Global<v8::Object> m_debuggerScript; | 179 v8::Global<v8::Object> m_debuggerScript; |
180 v8::Global<v8::Context> m_debuggerContext; | 180 v8::Global<v8::Context> m_debuggerContext; |
181 v8::Local<v8::Object> m_executionState; | 181 v8::Local<v8::Object> m_executionState; |
182 v8::Local<v8::Context> m_pausedContext; | 182 v8::Local<v8::Context> m_pausedContext; |
183 bool m_runningNestedMessageLoop; | |
184 int m_ignoreScriptParsedEventsCounter; | 183 int m_ignoreScriptParsedEventsCounter; |
185 bool m_scheduledOOMBreak = false; | 184 bool m_scheduledOOMBreak = false; |
186 int m_targetContextGroupId = 0; | 185 int m_targetContextGroupId = 0; |
| 186 int m_pausedContextGroupId = 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; | 192 protocol::HashSet<void*> m_recurringTasks; |
193 protocol::HashMap<void*, void*> m_parentTask; | 193 protocol::HashMap<void*, void*> m_parentTask; |
194 | 194 |
195 int m_maxAsyncCallStacks; | 195 int m_maxAsyncCallStacks; |
196 int m_maxAsyncCallStackDepth; | 196 int m_maxAsyncCallStackDepth; |
(...skipping 18 matching lines...) Expand all Loading... |
215 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 215 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
216 | 216 |
217 WasmTranslation m_wasmTranslation; | 217 WasmTranslation m_wasmTranslation; |
218 | 218 |
219 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 219 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
220 }; | 220 }; |
221 | 221 |
222 } // namespace v8_inspector | 222 } // namespace v8_inspector |
223 | 223 |
224 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 224 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
OLD | NEW |