| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 * Debug host dispatch callback function. | 238 * Debug host dispatch callback function. |
| 239 */ | 239 */ |
| 240 typedef void (*HostDispatchHandler)(); | 240 typedef void (*HostDispatchHandler)(); |
| 241 | 241 |
| 242 /** | 242 /** |
| 243 * Callback function for the host to ensure debug messages are processed. | 243 * Callback function for the host to ensure debug messages are processed. |
| 244 */ | 244 */ |
| 245 typedef void (*DebugMessageDispatchHandler)(); | 245 typedef void (*DebugMessageDispatchHandler)(); |
| 246 | 246 |
| 247 // Set a C debug event listener. | 247 // Set a C debug event listener. |
| 248 V8_DEPRECATED(static bool SetDebugEventListener( | 248 static bool SetDebugEventListener(EventCallback that, |
| 249 EventCallback that, | 249 Handle<Value> data = Handle<Value>()); |
| 250 Handle<Value> data = Handle<Value>())); | |
| 251 static bool SetDebugEventListener2(EventCallback2 that, | 250 static bool SetDebugEventListener2(EventCallback2 that, |
| 252 Handle<Value> data = Handle<Value>()); | 251 Handle<Value> data = Handle<Value>()); |
| 253 | 252 |
| 254 // Set a JavaScript debug event listener. | 253 // Set a JavaScript debug event listener. |
| 255 static bool SetDebugEventListener(v8::Handle<v8::Object> that, | 254 static bool SetDebugEventListener(v8::Handle<v8::Object> that, |
| 256 Handle<Value> data = Handle<Value>()); | 255 Handle<Value> data = Handle<Value>()); |
| 257 | 256 |
| 258 // Schedule a debugger break to happen when JavaScript code is run | 257 // Schedule a debugger break to happen when JavaScript code is run |
| 259 // in the given isolate. If no isolate is provided the default | 258 // in the given isolate. If no isolate is provided the default |
| 260 // isolate is used. | 259 // isolate is used. |
| 261 static void DebugBreak(Isolate* isolate = NULL); | 260 static void DebugBreak(Isolate* isolate = NULL); |
| 262 | 261 |
| 263 // Remove scheduled debugger break in given isolate if it has not | 262 // Remove scheduled debugger break in given isolate if it has not |
| 264 // happened yet. If no isolate is provided the default isolate is | 263 // happened yet. If no isolate is provided the default isolate is |
| 265 // used. | 264 // used. |
| 266 static void CancelDebugBreak(Isolate* isolate = NULL); | 265 static void CancelDebugBreak(Isolate* isolate = NULL); |
| 267 | 266 |
| 268 // Break execution of JavaScript in the given isolate (this method | 267 // Break execution of JavaScript in the given isolate (this method |
| 269 // can be invoked from a non-VM thread) for further client command | 268 // can be invoked from a non-VM thread) for further client command |
| 270 // execution on a VM thread. Client data is then passed in | 269 // execution on a VM thread. Client data is then passed in |
| 271 // EventDetails to EventCallback at the moment when the VM actually | 270 // EventDetails to EventCallback at the moment when the VM actually |
| 272 // stops. If no isolate is provided the default isolate is used. | 271 // stops. If no isolate is provided the default isolate is used. |
| 273 static void DebugBreakForCommand(ClientData* data = NULL, | 272 static void DebugBreakForCommand(ClientData* data = NULL, |
| 274 Isolate* isolate = NULL); | 273 Isolate* isolate = NULL); |
| 275 | 274 |
| 276 // Message based interface. The message protocol is JSON. NOTE the message | 275 // Message based interface. The message protocol is JSON. NOTE the message |
| 277 // handler thread is not supported any more parameter must be false. | 276 // handler thread is not supported any more parameter must be false. |
| 278 V8_DEPRECATED(static void SetMessageHandler( | 277 static void SetMessageHandler(MessageHandler handler, |
| 279 MessageHandler handler, | 278 bool message_handler_thread = false); |
| 280 bool message_handler_thread = false)); | |
| 281 static void SetMessageHandler2(MessageHandler2 handler); | 279 static void SetMessageHandler2(MessageHandler2 handler); |
| 282 | 280 |
| 283 // If no isolate is provided the default isolate is | 281 // If no isolate is provided the default isolate is |
| 284 // used. | 282 // used. |
| 285 static void SendCommand(const uint16_t* command, int length, | 283 static void SendCommand(const uint16_t* command, int length, |
| 286 ClientData* client_data = NULL, | 284 ClientData* client_data = NULL, |
| 287 Isolate* isolate = NULL); | 285 Isolate* isolate = NULL); |
| 288 | 286 |
| 289 // Dispatch interface. | 287 // Dispatch interface. |
| 290 static void SetHostDispatchHandler(HostDispatchHandler handler, | 288 static void SetHostDispatchHandler(HostDispatchHandler handler, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 }; | 399 }; |
| 402 | 400 |
| 403 | 401 |
| 404 } // namespace v8 | 402 } // namespace v8 |
| 405 | 403 |
| 406 | 404 |
| 407 #undef EXPORT | 405 #undef EXPORT |
| 408 | 406 |
| 409 | 407 |
| 410 #endif // V8_V8_DEBUG_H_ | 408 #endif // V8_V8_DEBUG_H_ |
| OLD | NEW |