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_DEBUG_DEBUG_INTERFACE_H_ | 5 #ifndef V8_DEBUG_DEBUG_INTERFACE_H_ |
6 #define V8_DEBUG_DEBUG_INTERFACE_H_ | 6 #define V8_DEBUG_DEBUG_INTERFACE_H_ |
7 | 7 |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "include/v8-debug.h" | 10 #include "include/v8-debug.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void SetBreakPointsActive(Isolate* isolate, bool is_active); | 95 void SetBreakPointsActive(Isolate* isolate, bool is_active); |
96 | 96 |
97 enum StepAction { | 97 enum StepAction { |
98 StepOut = 0, // Step out of the current function. | 98 StepOut = 0, // Step out of the current function. |
99 StepNext = 1, // Step to the next statement in the current function. | 99 StepNext = 1, // Step to the next statement in the current function. |
100 StepIn = 2 // Step into new functions invoked or the next statement | 100 StepIn = 2 // Step into new functions invoked or the next statement |
101 // in the current function. | 101 // in the current function. |
102 }; | 102 }; |
103 | 103 |
104 void PrepareStep(Isolate* isolate, StepAction action); | 104 void PrepareStep(Isolate* isolate, StepAction action); |
| 105 void ClearStepping(Isolate* isolate); |
105 | 106 |
106 bool HasNonBlackboxedFrameOnStack(Isolate* isolate); | 107 bool AllFramesOnStackAreBlackboxed(Isolate* isolate); |
107 | 108 |
108 /** | 109 /** |
109 * Out-of-memory callback function. | 110 * Out-of-memory callback function. |
110 * The function is invoked when the heap size is close to the hard limit. | 111 * The function is invoked when the heap size is close to the hard limit. |
111 * | 112 * |
112 * \param data the parameter provided during callback installation. | 113 * \param data the parameter provided during callback installation. |
113 */ | 114 */ |
114 typedef void (*OutOfMemoryCallback)(void* data); | 115 typedef void (*OutOfMemoryCallback)(void* data); |
115 void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback, | 116 void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback, |
116 void* data); | 117 void* data); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 }; | 158 }; |
158 | 159 |
159 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); | 160 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); |
160 | 161 |
161 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, | 162 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, |
162 Local<String> source); | 163 Local<String> source); |
163 | 164 |
164 class DebugDelegate { | 165 class DebugDelegate { |
165 public: | 166 public: |
166 virtual ~DebugDelegate() {} | 167 virtual ~DebugDelegate() {} |
167 virtual void PromiseEventOccurred(debug::PromiseDebugActionType type, int id, | 168 virtual void PromiseEventOccurred(v8::Local<v8::Context> context, |
168 int parent_id) {} | 169 debug::PromiseDebugActionType type, int id, |
| 170 int parent_id, bool created_by_user) {} |
169 virtual void ScriptCompiled(v8::Local<Script> script, | 171 virtual void ScriptCompiled(v8::Local<Script> script, |
170 bool has_compile_error) {} | 172 bool has_compile_error) {} |
171 virtual void BreakProgramRequested(v8::Local<v8::Context> paused_context, | 173 virtual void BreakProgramRequested(v8::Local<v8::Context> paused_context, |
172 v8::Local<v8::Object> exec_state, | 174 v8::Local<v8::Object> exec_state, |
173 v8::Local<v8::Value> break_points_hit) {} | 175 v8::Local<v8::Value> break_points_hit) {} |
174 virtual void ExceptionThrown(v8::Local<v8::Context> paused_context, | 176 virtual void ExceptionThrown(v8::Local<v8::Context> paused_context, |
175 v8::Local<v8::Object> exec_state, | 177 v8::Local<v8::Object> exec_state, |
176 v8::Local<v8::Value> exception, | 178 v8::Local<v8::Value> exception, |
177 v8::Local<v8::Value> promise, bool is_uncaught) { | 179 v8::Local<v8::Value> promise, bool is_uncaught) { |
178 } | 180 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 ~Coverage(); | 257 ~Coverage(); |
256 | 258 |
257 private: | 259 private: |
258 explicit Coverage(i::Coverage* coverage) : coverage_(coverage) {} | 260 explicit Coverage(i::Coverage* coverage) : coverage_(coverage) {} |
259 i::Coverage* coverage_; | 261 i::Coverage* coverage_; |
260 }; | 262 }; |
261 } // namespace debug | 263 } // namespace debug |
262 } // namespace v8 | 264 } // namespace v8 |
263 | 265 |
264 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ | 266 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ |
OLD | NEW |