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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 continueToLocation(int targetContextGroupId, | 64 Response continueToLocation(int targetContextGroupId, |
65 std::unique_ptr<protocol::Debugger::Location>); | 65 std::unique_ptr<protocol::Debugger::Location>, |
| 66 const String16& targetCallFramess); |
66 | 67 |
67 Response setScriptSource( | 68 Response setScriptSource( |
68 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun, | 69 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun, |
69 protocol::Maybe<protocol::Runtime::ExceptionDetails>*, | 70 protocol::Maybe<protocol::Runtime::ExceptionDetails>*, |
70 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged, | 71 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged, |
71 bool* compileError); | 72 bool* compileError); |
72 JavaScriptCallFrames currentCallFrames(int limit = 0); | 73 JavaScriptCallFrames currentCallFrames(int limit = 0); |
73 | 74 |
74 // Each script inherits debug data from v8::Context where it has been | 75 // Each script inherits debug data from v8::Context where it has been |
75 // compiled. | 76 // compiled. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 117 |
117 private: | 118 private: |
118 void compileDebuggerScript(); | 119 void compileDebuggerScript(); |
119 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, | 120 v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName, |
120 int argc, | 121 int argc, |
121 v8::Local<v8::Value> argv[], | 122 v8::Local<v8::Value> argv[], |
122 bool catchExceptions); | 123 bool catchExceptions); |
123 v8::Local<v8::Context> debuggerContext() const; | 124 v8::Local<v8::Context> debuggerContext() const; |
124 void clearBreakpoints(); | 125 void clearBreakpoints(); |
125 void clearContinueToLocation(); | 126 void clearContinueToLocation(); |
| 127 bool shouldContinueToCurrentLocation(); |
126 | 128 |
127 static void v8OOMCallback(void* data); | 129 static void v8OOMCallback(void* data); |
128 | 130 |
129 void handleProgramBreak(v8::Local<v8::Context> pausedContext, | 131 void handleProgramBreak(v8::Local<v8::Context> pausedContext, |
130 v8::Local<v8::Object> executionState, | 132 v8::Local<v8::Object> executionState, |
131 v8::Local<v8::Value> exception, | 133 v8::Local<v8::Value> exception, |
132 v8::Local<v8::Array> hitBreakpoints, | 134 v8::Local<v8::Array> hitBreakpoints, |
133 bool isPromiseRejection = false, | 135 bool isPromiseRejection = false, |
134 bool isUncaught = false); | 136 bool isUncaught = false); |
135 | 137 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 bool m_breakpointsActivated; | 184 bool m_breakpointsActivated; |
183 v8::Global<v8::Object> m_debuggerScript; | 185 v8::Global<v8::Object> m_debuggerScript; |
184 v8::Global<v8::Context> m_debuggerContext; | 186 v8::Global<v8::Context> m_debuggerContext; |
185 v8::Local<v8::Object> m_executionState; | 187 v8::Local<v8::Object> m_executionState; |
186 v8::Local<v8::Context> m_pausedContext; | 188 v8::Local<v8::Context> m_pausedContext; |
187 int m_ignoreScriptParsedEventsCounter; | 189 int m_ignoreScriptParsedEventsCounter; |
188 bool m_scheduledOOMBreak = false; | 190 bool m_scheduledOOMBreak = false; |
189 int m_targetContextGroupId = 0; | 191 int m_targetContextGroupId = 0; |
190 int m_pausedContextGroupId = 0; | 192 int m_pausedContextGroupId = 0; |
191 String16 m_continueToLocationBreakpointId; | 193 String16 m_continueToLocationBreakpointId; |
| 194 String16 m_continueToLocationTargetCallFrames; |
| 195 std::unique_ptr<V8StackTraceImpl> m_continueToLocationStack; |
192 | 196 |
193 using AsyncTaskToStackTrace = | 197 using AsyncTaskToStackTrace = |
194 protocol::HashMap<void*, std::weak_ptr<AsyncStackTrace>>; | 198 protocol::HashMap<void*, std::weak_ptr<AsyncStackTrace>>; |
195 AsyncTaskToStackTrace m_asyncTaskStacks; | 199 AsyncTaskToStackTrace m_asyncTaskStacks; |
196 AsyncTaskToStackTrace m_asyncTaskCreationStacks; | 200 AsyncTaskToStackTrace m_asyncTaskCreationStacks; |
197 protocol::HashSet<void*> m_recurringTasks; | 201 protocol::HashSet<void*> m_recurringTasks; |
198 protocol::HashMap<void*, void*> m_parentTask; | 202 protocol::HashMap<void*, void*> m_parentTask; |
199 | 203 |
200 int m_maxAsyncCallStacks; | 204 int m_maxAsyncCallStacks; |
201 int m_maxAsyncCallStackDepth; | 205 int m_maxAsyncCallStackDepth; |
(...skipping 18 matching lines...) Expand all Loading... |
220 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; | 224 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; |
221 | 225 |
222 WasmTranslation m_wasmTranslation; | 226 WasmTranslation m_wasmTranslation; |
223 | 227 |
224 DISALLOW_COPY_AND_ASSIGN(V8Debugger); | 228 DISALLOW_COPY_AND_ASSIGN(V8Debugger); |
225 }; | 229 }; |
226 | 230 |
227 } // namespace v8_inspector | 231 } // namespace v8_inspector |
228 | 232 |
229 #endif // V8_INSPECTOR_V8DEBUGGER_H_ | 233 #endif // V8_INSPECTOR_V8DEBUGGER_H_ |
OLD | NEW |