| 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 // Break execution of JavaScript in the given isolate (this method |
| 181 // can be invoked from a non-VM thread) and execute the given task on the |
| 182 // VM thread. The task is executed at most once and then gets deleted. |
| 183 // If the task does not happen to execute for some reason, the task is |
| 184 // deleted on the Isolate destruction. |
| 185 static void BreakAndRun(Isolate* isolate, Task* task); |
| 186 |
| 180 // Message based interface. The message protocol is JSON. | 187 // Message based interface. The message protocol is JSON. |
| 181 static void SetMessageHandler(MessageHandler handler); | 188 static void SetMessageHandler(MessageHandler handler); |
| 182 | 189 |
| 183 static void SendCommand(Isolate* isolate, | 190 static void SendCommand(Isolate* isolate, |
| 184 const uint16_t* command, int length, | 191 const uint16_t* command, int length, |
| 185 ClientData* client_data = NULL); | 192 ClientData* client_data = NULL); |
| 186 | 193 |
| 187 /** | 194 /** |
| 188 * Run a JavaScript function in the debugger. | 195 * Run a JavaScript function in the debugger. |
| 189 * \param fun the function to call | 196 * \param fun the function to call |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 }; | 268 }; |
| 262 | 269 |
| 263 | 270 |
| 264 } // namespace v8 | 271 } // namespace v8 |
| 265 | 272 |
| 266 | 273 |
| 267 #undef EXPORT | 274 #undef EXPORT |
| 268 | 275 |
| 269 | 276 |
| 270 #endif // V8_V8_DEBUG_H_ | 277 #endif // V8_V8_DEBUG_H_ |
| OLD | NEW |