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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 typedef void (*DebugMessageDispatchHandler)(); | 183 typedef void (*DebugMessageDispatchHandler)(); |
184 | 184 |
185 static bool SetDebugEventListener2(EventCallback2 that, | 185 static bool SetDebugEventListener2(EventCallback2 that, |
186 Handle<Value> data = Handle<Value>()); | 186 Handle<Value> data = Handle<Value>()); |
187 | 187 |
188 // Set a JavaScript debug event listener. | 188 // Set a JavaScript debug event listener. |
189 static bool SetDebugEventListener(v8::Handle<v8::Object> that, | 189 static bool SetDebugEventListener(v8::Handle<v8::Object> that, |
190 Handle<Value> data = Handle<Value>()); | 190 Handle<Value> data = Handle<Value>()); |
191 | 191 |
192 // Schedule a debugger break to happen when JavaScript code is run | 192 // Schedule a debugger break to happen when JavaScript code is run |
193 // in the given isolate. If no isolate is provided the default | 193 // in the given isolate. |
194 // isolate is used. | 194 static void DebugBreak(Isolate* isolate); |
195 static void DebugBreak(Isolate* isolate = NULL); | |
Paweł Hajdan Jr.
2014/04/17 14:24:07
Shouldn't these also go through V8_DEPRECATED befo
Sven Panne
2014/04/22 07:46:25
In theory yes, in practice no. The current changes
| |
196 | 195 |
197 // Remove scheduled debugger break in given isolate if it has not | 196 // Remove scheduled debugger break in given isolate if it has not |
198 // happened yet. If no isolate is provided the default isolate is | 197 // happened yet. |
199 // used. | 198 static void CancelDebugBreak(Isolate* isolate); |
200 static void CancelDebugBreak(Isolate* isolate = NULL); | |
201 | 199 |
202 // Break execution of JavaScript in the given isolate (this method | 200 // Break execution of JavaScript in the given isolate (this method |
203 // can be invoked from a non-VM thread) for further client command | 201 // can be invoked from a non-VM thread) for further client command |
204 // execution on a VM thread. Client data is then passed in | 202 // execution on a VM thread. Client data is then passed in |
205 // EventDetails to EventCallback2 at the moment when the VM actually | 203 // EventDetails to EventCallback2 at the moment when the VM actually |
206 // stops. If no isolate is provided the default isolate is used. | 204 // stops. |
207 static void DebugBreakForCommand(ClientData* data = NULL, | 205 static void DebugBreakForCommand(Isolate* isolate, ClientData* data); |
208 Isolate* isolate = NULL); | 206 |
207 // TODO(svenpanne) Remove this when Chrome is updated. | |
208 static void DebugBreakForCommand(ClientData* data, Isolate* isolate) { | |
209 DebugBreakForCommand(isolate, data); | |
210 } | |
209 | 211 |
210 // Message based interface. The message protocol is JSON. | 212 // Message based interface. The message protocol is JSON. |
211 static void SetMessageHandler2(MessageHandler2 handler); | 213 static void SetMessageHandler2(MessageHandler2 handler); |
212 | 214 |
213 // If no isolate is provided the default isolate is | |
214 // used. | |
215 // TODO(dcarney): remove | |
216 static void SendCommand(const uint16_t* command, int length, | |
217 ClientData* client_data = NULL, | |
218 Isolate* isolate = NULL); | |
219 static void SendCommand(Isolate* isolate, | 215 static void SendCommand(Isolate* isolate, |
220 const uint16_t* command, int length, | 216 const uint16_t* command, int length, |
221 ClientData* client_data = NULL); | 217 ClientData* client_data = NULL); |
222 | 218 |
223 // Dispatch interface. | 219 // Dispatch interface. |
224 static void SetHostDispatchHandler(HostDispatchHandler handler, | 220 static void SetHostDispatchHandler(HostDispatchHandler handler, |
225 int period = 100); | 221 int period = 100); |
226 | 222 |
227 /** | 223 /** |
228 * Register a callback function to be called when a debug message has been | 224 * Register a callback function to be called when a debug message has been |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
324 * to change. | 320 * to change. |
325 */ | 321 */ |
326 static Local<Context> GetDebugContext(); | 322 static Local<Context> GetDebugContext(); |
327 | 323 |
328 | 324 |
329 /** | 325 /** |
330 * Enable/disable LiveEdit functionality for the given Isolate | 326 * Enable/disable LiveEdit functionality for the given Isolate |
331 * (default Isolate if not provided). V8 will abort if LiveEdit is | 327 * (default Isolate if not provided). V8 will abort if LiveEdit is |
332 * unexpectedly used. LiveEdit is enabled by default. | 328 * unexpectedly used. LiveEdit is enabled by default. |
333 */ | 329 */ |
334 static void SetLiveEditEnabled(bool enable, Isolate* isolate = NULL); | 330 static void SetLiveEditEnabled(Isolate* isolate, bool enable); |
331 | |
332 // TODO(svenpanne) Remove this when Chrome is updated. | |
333 static void SetLiveEditEnabled(bool enable, Isolate* isolate) { | |
334 SetLiveEditEnabled(isolate, enable); | |
335 } | |
335 }; | 336 }; |
336 | 337 |
337 | 338 |
338 } // namespace v8 | 339 } // namespace v8 |
339 | 340 |
340 | 341 |
341 #undef EXPORT | 342 #undef EXPORT |
342 | 343 |
343 | 344 |
344 #endif // V8_V8_DEBUG_H_ | 345 #endif // V8_V8_DEBUG_H_ |
OLD | NEW |