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 static bool SetDebugEventListener(EventCallback that, | 248 V8_DEPRECATED(static bool SetDebugEventListener( |
249 Handle<Value> data = Handle<Value>()); | 249 EventCallback that, |
| 250 Handle<Value> data = Handle<Value>())); |
250 static bool SetDebugEventListener2(EventCallback2 that, | 251 static bool SetDebugEventListener2(EventCallback2 that, |
251 Handle<Value> data = Handle<Value>()); | 252 Handle<Value> data = Handle<Value>()); |
252 | 253 |
253 // Set a JavaScript debug event listener. | 254 // Set a JavaScript debug event listener. |
254 static bool SetDebugEventListener(v8::Handle<v8::Object> that, | 255 static bool SetDebugEventListener(v8::Handle<v8::Object> that, |
255 Handle<Value> data = Handle<Value>()); | 256 Handle<Value> data = Handle<Value>()); |
256 | 257 |
257 // Schedule a debugger break to happen when JavaScript code is run | 258 // Schedule a debugger break to happen when JavaScript code is run |
258 // in the given isolate. If no isolate is provided the default | 259 // in the given isolate. If no isolate is provided the default |
259 // isolate is used. | 260 // isolate is used. |
260 static void DebugBreak(Isolate* isolate = NULL); | 261 static void DebugBreak(Isolate* isolate = NULL); |
261 | 262 |
262 // Remove scheduled debugger break in given isolate if it has not | 263 // Remove scheduled debugger break in given isolate if it has not |
263 // happened yet. If no isolate is provided the default isolate is | 264 // happened yet. If no isolate is provided the default isolate is |
264 // used. | 265 // used. |
265 static void CancelDebugBreak(Isolate* isolate = NULL); | 266 static void CancelDebugBreak(Isolate* isolate = NULL); |
266 | 267 |
267 // Break execution of JavaScript in the given isolate (this method | 268 // Break execution of JavaScript in the given isolate (this method |
268 // can be invoked from a non-VM thread) for further client command | 269 // can be invoked from a non-VM thread) for further client command |
269 // execution on a VM thread. Client data is then passed in | 270 // execution on a VM thread. Client data is then passed in |
270 // EventDetails to EventCallback at the moment when the VM actually | 271 // EventDetails to EventCallback at the moment when the VM actually |
271 // stops. If no isolate is provided the default isolate is used. | 272 // stops. If no isolate is provided the default isolate is used. |
272 static void DebugBreakForCommand(ClientData* data = NULL, | 273 static void DebugBreakForCommand(ClientData* data = NULL, |
273 Isolate* isolate = NULL); | 274 Isolate* isolate = NULL); |
274 | 275 |
275 // Message based interface. The message protocol is JSON. NOTE the message | 276 // Message based interface. The message protocol is JSON. NOTE the message |
276 // handler thread is not supported any more parameter must be false. | 277 // handler thread is not supported any more parameter must be false. |
277 static void SetMessageHandler(MessageHandler handler, | 278 V8_DEPRECATED(static void SetMessageHandler( |
278 bool message_handler_thread = false); | 279 MessageHandler handler, |
| 280 bool message_handler_thread = false)); |
279 static void SetMessageHandler2(MessageHandler2 handler); | 281 static void SetMessageHandler2(MessageHandler2 handler); |
280 | 282 |
281 // If no isolate is provided the default isolate is | 283 // If no isolate is provided the default isolate is |
282 // used. | 284 // used. |
283 static void SendCommand(const uint16_t* command, int length, | 285 static void SendCommand(const uint16_t* command, int length, |
284 ClientData* client_data = NULL, | 286 ClientData* client_data = NULL, |
285 Isolate* isolate = NULL); | 287 Isolate* isolate = NULL); |
286 | 288 |
287 // Dispatch interface. | 289 // Dispatch interface. |
288 static void SetHostDispatchHandler(HostDispatchHandler handler, | 290 static void SetHostDispatchHandler(HostDispatchHandler handler, |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 }; | 401 }; |
400 | 402 |
401 | 403 |
402 } // namespace v8 | 404 } // namespace v8 |
403 | 405 |
404 | 406 |
405 #undef EXPORT | 407 #undef EXPORT |
406 | 408 |
407 | 409 |
408 #endif // V8_V8_DEBUG_H_ | 410 #endif // V8_V8_DEBUG_H_ |
OLD | NEW |