OLD | NEW |
---|---|
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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_V8_DEBUG_H_ | 5 #ifndef V8_V8_DEBUG_H_ |
6 #define V8_V8_DEBUG_H_ | 6 #define V8_V8_DEBUG_H_ |
7 | 7 |
8 #include "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 /** | 10 /** |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 // Check if a debugger break is scheduled in the given isolate. | 170 // Check if a debugger break is scheduled in the given isolate. |
171 static bool CheckDebugBreak(Isolate* isolate); | 171 static bool CheckDebugBreak(Isolate* isolate); |
172 | 172 |
173 // Break execution of JavaScript in the given isolate (this method | 173 // Break execution of JavaScript in the given isolate (this method |
174 // can be invoked from a non-VM thread) for further client command | 174 // can be invoked from a non-VM thread) for further client command |
175 // execution on a VM thread. Client data is then passed in | 175 // execution on a VM thread. Client data is then passed in |
176 // EventDetails to EventCallback2 at the moment when the VM actually | 176 // EventDetails to EventCallback2 at the moment when the VM actually |
177 // stops. | 177 // stops. |
178 static void DebugBreakForCommand(Isolate* isolate, ClientData* data); | 178 static void DebugBreakForCommand(Isolate* isolate, ClientData* data); |
179 | 179 |
180 class Task { | |
Sven Panne
2014/12/18 08:27:50
We already have v8::Task, why do we need another o
alph
2014/12/18 14:28:03
Sorry, missed the v8::Task.
| |
181 public: | |
182 virtual void Run() = 0; | |
183 virtual ~Task() {} | |
184 }; | |
185 | |
186 // Break execution of JavaScript in the given isolate (this method | |
187 // can be invoked from a non-VM thread) and execute the given task on the | |
188 // VM thread. The VM takes ownership of the task. | |
Sven Panne
2014/12/18 08:27:51
Please extend the comment a bit, describing that t
alph
2014/12/18 14:28:03
Done.
| |
189 static void BreakAndRun(Isolate* isolate, Task* task); | |
190 | |
180 // Message based interface. The message protocol is JSON. | 191 // Message based interface. The message protocol is JSON. |
181 static void SetMessageHandler(MessageHandler handler); | 192 static void SetMessageHandler(MessageHandler handler); |
182 | 193 |
183 static void SendCommand(Isolate* isolate, | 194 static void SendCommand(Isolate* isolate, |
184 const uint16_t* command, int length, | 195 const uint16_t* command, int length, |
185 ClientData* client_data = NULL); | 196 ClientData* client_data = NULL); |
186 | 197 |
187 /** | 198 /** |
188 * Run a JavaScript function in the debugger. | 199 * Run a JavaScript function in the debugger. |
189 * \param fun the function to call | 200 * \param fun the function to call |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 }; | 272 }; |
262 | 273 |
263 | 274 |
264 } // namespace v8 | 275 } // namespace v8 |
265 | 276 |
266 | 277 |
267 #undef EXPORT | 278 #undef EXPORT |
268 | 279 |
269 | 280 |
270 #endif // V8_V8_DEBUG_H_ | 281 #endif // V8_V8_DEBUG_H_ |
OLD | NEW |