From a7d1cb3f2aa088c621533e9e37544a75a46c0198 Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Thu, 18 Jul 2013 07:34:19 +0000 Subject: [PATCH] Revert "Deprecate some debugger methods" This reverts commit 69957c36edaebe0b9b614099eb1b067fb0208671. Blink roll this patch depends on was reverted for some reason. BUG=None TBR=yangguo@chromium.org Review URL: https://codereview.chromium.org/19483003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- include/v8-debug.h | 10 ++++------ src/d8-debug.cc | 8 ++++---- src/d8-debug.h | 5 ++++- src/d8.cc | 2 +- test/cctest/test-debug.cc | 2 -- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/v8-debug.h b/include/v8-debug.h index e488aaa..f432de0 100755 --- a/include/v8-debug.h +++ b/include/v8-debug.h @@ -245,9 +245,8 @@ class EXPORT Debug { typedef void (*DebugMessageDispatchHandler)(); // Set a C debug event listener. - V8_DEPRECATED(static bool SetDebugEventListener( - EventCallback that, - Handle data = Handle())); + static bool SetDebugEventListener(EventCallback that, + Handle data = Handle()); static bool SetDebugEventListener2(EventCallback2 that, Handle data = Handle()); @@ -275,9 +274,8 @@ class EXPORT Debug { // Message based interface. The message protocol is JSON. NOTE the message // handler thread is not supported any more parameter must be false. - V8_DEPRECATED(static void SetMessageHandler( - MessageHandler handler, - bool message_handler_thread = false)); + static void SetMessageHandler(MessageHandler handler, + bool message_handler_thread = false); static void SetMessageHandler2(MessageHandler2 handler); // If no isolate is provided the default isolate is diff --git a/src/d8-debug.cc b/src/d8-debug.cc index 9a72518..aac7aab 100644 --- a/src/d8-debug.cc +++ b/src/d8-debug.cc @@ -50,12 +50,14 @@ void PrintPrompt() { } -void HandleDebugEvent(const Debug::EventDetails& event_details) { +void HandleDebugEvent(DebugEvent event, + Handle exec_state, + Handle event_data, + Handle data) { // TODO(svenpanne) There should be a way to retrieve this in the callback. Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); - DebugEvent event = event_details.GetEvent(); // Check for handled event. if (event != Break && event != Exception && event != AfterCompile) { return; @@ -65,7 +67,6 @@ void HandleDebugEvent(const Debug::EventDetails& event_details) { // Get the toJSONProtocol function on the event and get the JSON format. Local to_json_fun_name = String::New("toJSONProtocol"); - Handle event_data = event_details.GetEventData(); Local to_json_fun = Local::Cast(event_data->Get(to_json_fun_name)); Local event_json = to_json_fun->Call(event_data, 0, NULL); @@ -90,7 +91,6 @@ void HandleDebugEvent(const Debug::EventDetails& event_details) { // Get the debug command processor. Local fun_name = String::New("debugCommandProcessor"); - Handle exec_state = event_details.GetExecutionState(); Local fun = Local::Cast(exec_state->Get(fun_name)); Local cmd_processor = Local::Cast(fun->Call(exec_state, 0, NULL)); diff --git a/src/d8-debug.h b/src/d8-debug.h index 2386b6b..a6cea2a 100644 --- a/src/d8-debug.h +++ b/src/d8-debug.h @@ -36,7 +36,10 @@ namespace v8 { -void HandleDebugEvent(const Debug::EventDetails& event_details); +void HandleDebugEvent(DebugEvent event, + Handle exec_state, + Handle event_data, + Handle data); // Start the remove debugger connecting to a V8 debugger agent on the specified // port. diff --git a/src/d8.cc b/src/d8.cc index e576e9c..3ac8db0 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -810,7 +810,7 @@ void Shell::InstallUtilityScript(Isolate* isolate) { #ifdef ENABLE_DEBUGGER_SUPPORT // Start the in-process debugger if requested. if (i::FLAG_debugger && !i::FLAG_debugger_agent) { - v8::Debug::SetDebugEventListener2(HandleDebugEvent); + v8::Debug::SetDebugEventListener(HandleDebugEvent); } #endif // ENABLE_DEBUGGER_SUPPORT } diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc index 484eb8e..0f31c14 100644 --- a/test/cctest/test-debug.cc +++ b/test/cctest/test-debug.cc @@ -29,7 +29,6 @@ #include -#define V8_DISABLE_DEPRECATIONS 1 #include "v8.h" #include "api.h" @@ -40,7 +39,6 @@ #include "platform.h" #include "stub-cache.h" #include "utils.h" -#undef V8_DISABLE_DEPRECATIONS using ::v8::internal::EmbeddedVector; -- 2.7.4