Rename debug API methods.
R=yurys@chromium.org Review URL: https://codereview.chromium.org/281733002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21295 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2ea755fc8c
commit
20a627183f
@ -137,7 +137,10 @@ class V8_EXPORT Debug {
|
||||
* A EventCallback2 does not take possession of the event data,
|
||||
* and must not rely on the data persisting after the handler returns.
|
||||
*/
|
||||
typedef void (*EventCallback2)(const EventDetails& event_details);
|
||||
typedef void (*EventCallback)(const EventDetails& event_details);
|
||||
|
||||
// TODO(yangguo) Deprecate this.
|
||||
typedef EventCallback EventCallback2;
|
||||
|
||||
/**
|
||||
* Debug message callback function.
|
||||
@ -147,15 +150,24 @@ class V8_EXPORT Debug {
|
||||
* A MessageHandler2 does not take possession of the message data,
|
||||
* and must not rely on the data persisting after the handler returns.
|
||||
*/
|
||||
typedef void (*MessageHandler2)(const Message& message);
|
||||
typedef void (*MessageHandler)(const Message& message);
|
||||
|
||||
// TODO(yangguo) Deprecate this.
|
||||
typedef MessageHandler MessageHandler2;
|
||||
|
||||
/**
|
||||
* Callback function for the host to ensure debug messages are processed.
|
||||
*/
|
||||
typedef void (*DebugMessageDispatchHandler)();
|
||||
|
||||
static bool SetDebugEventListener(EventCallback that,
|
||||
Handle<Value> data = Handle<Value>());
|
||||
|
||||
// TODO(yangguo) Deprecate this.
|
||||
static bool SetDebugEventListener2(EventCallback2 that,
|
||||
Handle<Value> data = Handle<Value>());
|
||||
Handle<Value> data = Handle<Value>()) {
|
||||
return SetDebugEventListener(that, data);
|
||||
}
|
||||
|
||||
// Schedule a debugger break to happen when JavaScript code is run
|
||||
// in the given isolate.
|
||||
@ -178,7 +190,12 @@ class V8_EXPORT Debug {
|
||||
}
|
||||
|
||||
// Message based interface. The message protocol is JSON.
|
||||
static void SetMessageHandler2(MessageHandler2 handler);
|
||||
static void SetMessageHandler(MessageHandler handler);
|
||||
|
||||
// TODO(yangguo) Deprecate this.
|
||||
static void SetMessageHandler2(MessageHandler2 handler) {
|
||||
SetMessageHandler(handler);
|
||||
}
|
||||
|
||||
static void SendCommand(Isolate* isolate,
|
||||
const uint16_t* command, int length,
|
||||
|
@ -6778,10 +6778,10 @@ Local<Value> Exception::Error(v8::Handle<v8::String> raw_message) {
|
||||
|
||||
// --- D e b u g S u p p o r t ---
|
||||
|
||||
bool Debug::SetDebugEventListener2(EventCallback2 that, Handle<Value> data) {
|
||||
bool Debug::SetDebugEventListener(EventCallback that, Handle<Value> data) {
|
||||
i::Isolate* isolate = i::Isolate::Current();
|
||||
EnsureInitializedForIsolate(isolate, "v8::Debug::SetDebugEventListener2()");
|
||||
ON_BAILOUT(isolate, "v8::Debug::SetDebugEventListener2()", return false);
|
||||
EnsureInitializedForIsolate(isolate, "v8::Debug::SetDebugEventListener()");
|
||||
ON_BAILOUT(isolate, "v8::Debug::SetDebugEventListener()", return false);
|
||||
ENTER_V8(isolate);
|
||||
i::HandleScope scope(isolate);
|
||||
i::Handle<i::Object> foreign = isolate->factory()->undefined_value();
|
||||
@ -6811,7 +6811,7 @@ void Debug::DebugBreakForCommand(Isolate* isolate, ClientData* data) {
|
||||
}
|
||||
|
||||
|
||||
void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) {
|
||||
void Debug::SetMessageHandler(v8::Debug::MessageHandler handler) {
|
||||
i::Isolate* isolate = i::Isolate::Current();
|
||||
EnsureInitializedForIsolate(isolate, "v8::Debug::SetMessageHandler");
|
||||
ENTER_V8(isolate);
|
||||
|
@ -797,7 +797,7 @@ void Shell::InstallUtilityScript(Isolate* isolate) {
|
||||
|
||||
// Start the in-process debugger if requested.
|
||||
if (i::FLAG_debugger && !i::FLAG_debugger_agent) {
|
||||
v8::Debug::SetDebugEventListener2(HandleDebugEvent);
|
||||
v8::Debug::SetDebugEventListener(HandleDebugEvent);
|
||||
}
|
||||
}
|
||||
#endif // !V8_SHARED
|
||||
|
@ -3180,7 +3180,7 @@ void Debugger::SetEventListener(Handle<Object> callback,
|
||||
}
|
||||
|
||||
|
||||
void Debugger::SetMessageHandler(v8::Debug::MessageHandler2 handler) {
|
||||
void Debugger::SetMessageHandler(v8::Debug::MessageHandler handler) {
|
||||
LockGuard<RecursiveMutex> with(&debugger_access_);
|
||||
|
||||
message_handler_ = handler;
|
||||
|
@ -782,7 +782,7 @@ class Debugger {
|
||||
Handle<JSObject> event_data,
|
||||
bool auto_continue);
|
||||
void SetEventListener(Handle<Object> callback, Handle<Object> data);
|
||||
void SetMessageHandler(v8::Debug::MessageHandler2 handler);
|
||||
void SetMessageHandler(v8::Debug::MessageHandler handler);
|
||||
void SetDebugMessageDispatchHandler(
|
||||
v8::Debug::DebugMessageDispatchHandler handler,
|
||||
bool provide_locker);
|
||||
@ -889,7 +889,7 @@ class Debugger {
|
||||
bool ignore_debugger_; // Are we temporarily ignoring the debugger?
|
||||
bool live_edit_enabled_; // Enable LiveEdit.
|
||||
bool never_unload_debugger_; // Can we unload the debugger?
|
||||
v8::Debug::MessageHandler2 message_handler_;
|
||||
v8::Debug::MessageHandler message_handler_;
|
||||
bool debugger_unload_pending_; // Was message handler cleared?
|
||||
|
||||
Mutex dispatch_handler_access_; // Mutex guarding dispatch handler.
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user