v8-debug.h | v8-debug.h | |||
---|---|---|---|---|
skipping to change at line 78 | skipping to change at line 78 | |||
*/ | */ | |||
namespace v8 { | namespace v8 { | |||
// Debug events which can occur in the V8 JavaScript engine. | // Debug events which can occur in the V8 JavaScript engine. | |||
enum DebugEvent { | enum DebugEvent { | |||
Break = 1, | Break = 1, | |||
Exception = 2, | Exception = 2, | |||
NewFunction = 3, | NewFunction = 3, | |||
BeforeCompile = 4, | BeforeCompile = 4, | |||
AfterCompile = 5, | AfterCompile = 5, | |||
ScriptCollected = 6 | ScriptCollected = 6, | |||
BreakForCommand = 7 | ||||
}; | }; | |||
class EXPORT Debug { | class EXPORT Debug { | |||
public: | public: | |||
/** | /** | |||
* A client object passed to the v8 debugger whose ownership will be take n by | * A client object passed to the v8 debugger whose ownership will be take n by | |||
* it. v8 is always responsible for deleting the object. | * it. v8 is always responsible for deleting the object. | |||
*/ | */ | |||
class ClientData { | class ClientData { | |||
public: | public: | |||
skipping to change at line 171 | skipping to change at line 172 | |||
* the current active context as the JavaScript part of the debugger is | * the current active context as the JavaScript part of the debugger is | |||
* running in it's own context which is entered at this point. | * running in it's own context which is entered at this point. | |||
*/ | */ | |||
virtual Handle<Context> GetEventContext() const = 0; | virtual Handle<Context> GetEventContext() const = 0; | |||
/** | /** | |||
* Client data passed with the corresponding callbak whet it was regist ered. | * Client data passed with the corresponding callbak whet it was regist ered. | |||
*/ | */ | |||
virtual Handle<Value> GetCallbackData() const = 0; | virtual Handle<Value> GetCallbackData() const = 0; | |||
/** | ||||
* Client data passed to DebugBreakForCommand function. The | ||||
* debugger takes ownership of the data and will delete it even if | ||||
* there is no message handler. | ||||
*/ | ||||
virtual ClientData* GetClientData() const = 0; | ||||
virtual ~EventDetails() {} | virtual ~EventDetails() {} | |||
}; | }; | |||
/** | /** | |||
* Debug event callback function. | * Debug event callback function. | |||
* | * | |||
* \param event the type of the debug event that triggered the callback | * \param event the type of the debug event that triggered the callback | |||
* (enum DebugEvent) | * (enum DebugEvent) | |||
* \param exec_state execution state (JavaScript object) | * \param exec_state execution state (JavaScript object) | |||
* \param event_data event specific data (JavaScript object) | * \param event_data event specific data (JavaScript object) | |||
skipping to change at line 246 | skipping to change at line 254 | |||
static bool SetDebugEventListener2(EventCallback2 that, | static bool SetDebugEventListener2(EventCallback2 that, | |||
Handle<Value> data = Handle<Value>()); | Handle<Value> data = Handle<Value>()); | |||
// Set a JavaScript debug event listener. | // Set a JavaScript debug event listener. | |||
static bool SetDebugEventListener(v8::Handle<v8::Object> that, | static bool SetDebugEventListener(v8::Handle<v8::Object> that, | |||
Handle<Value> data = Handle<Value>()); | Handle<Value> data = Handle<Value>()); | |||
// Break execution of JavaScript. | // Break execution of JavaScript. | |||
static void DebugBreak(); | static void DebugBreak(); | |||
// Break execution of JavaScript (this method can be invoked from a | ||||
// non-VM thread) for further client command execution on a VM | ||||
// thread. Client data is then passed in EventDetails to | ||||
// EventCallback at the moment when the VM actually stops. | ||||
static void DebugBreakForCommand(ClientData* data = NULL); | ||||
// Message based interface. The message protocol is JSON. NOTE the messag e | // Message based interface. The message protocol is JSON. NOTE the messag e | |||
// handler thread is not supported any more parameter must be false. | // handler thread is not supported any more parameter must be false. | |||
static void SetMessageHandler(MessageHandler handler, | static void SetMessageHandler(MessageHandler handler, | |||
bool message_handler_thread = false); | bool message_handler_thread = false); | |||
static void SetMessageHandler2(MessageHandler2 handler); | static void SetMessageHandler2(MessageHandler2 handler); | |||
static void SendCommand(const uint16_t* command, int length, | static void SendCommand(const uint16_t* command, int length, | |||
ClientData* client_data = NULL); | ClientData* client_data = NULL); | |||
// Dispatch interface. | // Dispatch interface. | |||
static void SetHostDispatchHandler(HostDispatchHandler handler, | static void SetHostDispatchHandler(HostDispatchHandler handler, | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 15 lines changed or added | |||