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 "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
9 #include "include/v8-util.h" | 9 #include "include/v8-util.h" |
10 #include "include/v8.h" | 10 #include "include/v8.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 StepNext = 1, // Step to the next statement in the current function. | 132 StepNext = 1, // Step to the next statement in the current function. |
133 StepIn = 2, // Step into new functions invoked or the next statement | 133 StepIn = 2, // Step into new functions invoked or the next statement |
134 // in the current function. | 134 // in the current function. |
135 StepFrame = 3 // Step into a new frame or return to previous frame. | 135 StepFrame = 3 // Step into a new frame or return to previous frame. |
136 }; | 136 }; |
137 | 137 |
138 void PrepareStep(Isolate* isolate, StepAction action); | 138 void PrepareStep(Isolate* isolate, StepAction action); |
139 void ClearStepping(Isolate* isolate); | 139 void ClearStepping(Isolate* isolate); |
140 | 140 |
141 /** | 141 /** |
| 142 * Out-of-memory callback function. |
| 143 * The function is invoked when the heap size is close to the hard limit. |
| 144 * |
| 145 * \param data the parameter provided during callback installation. |
| 146 */ |
| 147 typedef void (*OutOfMemoryCallback)(void* data); |
| 148 void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback, |
| 149 void* data); |
| 150 |
| 151 /** |
142 * Native wrapper around v8::internal::Script object. | 152 * Native wrapper around v8::internal::Script object. |
143 */ | 153 */ |
144 class Script { | 154 class Script { |
145 public: | 155 public: |
146 v8::Isolate* GetIsolate() const; | 156 v8::Isolate* GetIsolate() const; |
147 | 157 |
148 ScriptOriginOptions OriginOptions() const; | 158 ScriptOriginOptions OriginOptions() const; |
149 bool WasCompiled() const; | 159 bool WasCompiled() const; |
150 int Id() const; | 160 int Id() const; |
151 int LineOffset() const; | 161 int LineOffset() const; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 199 |
190 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); | 200 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); |
191 | 201 |
192 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, | 202 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, |
193 Local<String> source); | 203 Local<String> source); |
194 | 204 |
195 } // namespace debug | 205 } // namespace debug |
196 } // namespace v8 | 206 } // namespace v8 |
197 | 207 |
198 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ | 208 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ |
OLD | NEW |