Revision: 15734
Author:   [email protected]
Date:     Wed Jul 17 23:51:03 2013
Log:      Deprecate some debugger methods

These methods have been superceeded by equivalents accepting object arguments exposing more details.

This is exactly the same change as r15708 which was reverted in r15710 due to pending Blink changes.

BUG=None
[email protected]

Review URL: https://codereview.chromium.org/19542003
http://code.google.com/p/v8/source/detail?r=15734

Modified:
 /branches/bleeding_edge/include/v8-debug.h
 /branches/bleeding_edge/src/d8-debug.cc
 /branches/bleeding_edge/src/d8-debug.h
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/test/cctest/test-debug.cc

=======================================
--- /branches/bleeding_edge/include/v8-debug.h  Wed Jul 17 03:03:49 2013
+++ /branches/bleeding_edge/include/v8-debug.h  Wed Jul 17 23:51:03 2013
@@ -245,8 +245,9 @@
   typedef void (*DebugMessageDispatchHandler)();

   // Set a C debug event listener.
-  static bool SetDebugEventListener(EventCallback that,
-                                    Handle<Value> data = Handle<Value>());
+  V8_DEPRECATED(static bool SetDebugEventListener(
+      EventCallback that,
+      Handle<Value> data = Handle<Value>()));
   static bool SetDebugEventListener2(EventCallback2 that,
                                      Handle<Value> data = Handle<Value>());

@@ -274,8 +275,9 @@

// Message based interface. The message protocol is JSON. NOTE the message
   // handler thread is not supported any more parameter must be false.
-  static void SetMessageHandler(MessageHandler handler,
-                                bool message_handler_thread = false);
+  V8_DEPRECATED(static void SetMessageHandler(
+      MessageHandler handler,
+      bool message_handler_thread = false));
   static void SetMessageHandler2(MessageHandler2 handler);

   // If no isolate is provided the default isolate is
=======================================
--- /branches/bleeding_edge/src/d8-debug.cc     Wed Jul 17 03:03:49 2013
+++ /branches/bleeding_edge/src/d8-debug.cc     Wed Jul 17 23:51:03 2013
@@ -50,14 +50,12 @@
 }


-void HandleDebugEvent(DebugEvent event,
-                      Handle<Object> exec_state,
-                      Handle<Object> event_data,
-                      Handle<Value> data) {
+void HandleDebugEvent(const Debug::EventDetails& event_details) {
// 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;
@@ -67,6 +65,7 @@

   // Get the toJSONProtocol function on the event and get the JSON format.
   Local<String> to_json_fun_name = String::New("toJSONProtocol");
+  Handle<Object> event_data = event_details.GetEventData();
   Local<Function> to_json_fun =
       Local<Function>::Cast(event_data->Get(to_json_fun_name));
   Local<Value> event_json = to_json_fun->Call(event_data, 0, NULL);
@@ -91,6 +90,7 @@

   // Get the debug command processor.
   Local<String> fun_name = String::New("debugCommandProcessor");
+  Handle<Object> exec_state = event_details.GetExecutionState();
   Local<Function> fun = Local<Function>::Cast(exec_state->Get(fun_name));
   Local<Object> cmd_processor =
       Local<Object>::Cast(fun->Call(exec_state, 0, NULL));
=======================================
--- /branches/bleeding_edge/src/d8-debug.h      Wed Jul 17 03:03:49 2013
+++ /branches/bleeding_edge/src/d8-debug.h      Wed Jul 17 23:51:03 2013
@@ -36,10 +36,7 @@
 namespace v8 {


-void HandleDebugEvent(DebugEvent event,
-                      Handle<Object> exec_state,
-                      Handle<Object> event_data,
-                      Handle<Value> data);
+void HandleDebugEvent(const Debug::EventDetails& event_details);

// Start the remove debugger connecting to a V8 debugger agent on the specified
 // port.
=======================================
--- /branches/bleeding_edge/src/d8.cc   Wed Jul 17 03:03:49 2013
+++ /branches/bleeding_edge/src/d8.cc   Wed Jul 17 23:51:03 2013
@@ -810,7 +810,7 @@
 #ifdef ENABLE_DEBUGGER_SUPPORT
   // Start the in-process debugger if requested.
   if (i::FLAG_debugger && !i::FLAG_debugger_agent) {
-    v8::Debug::SetDebugEventListener(HandleDebugEvent);
+    v8::Debug::SetDebugEventListener2(HandleDebugEvent);
   }
 #endif  // ENABLE_DEBUGGER_SUPPORT
 }
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Wed Jul 17 03:03:49 2013 +++ /branches/bleeding_edge/test/cctest/test-debug.cc Wed Jul 17 23:51:03 2013
@@ -29,6 +29,7 @@

 #include <stdlib.h>

+#define V8_DISABLE_DEPRECATIONS 1
 #include "v8.h"

 #include "api.h"
@@ -39,6 +40,7 @@
 #include "platform.h"
 #include "stub-cache.h"
 #include "utils.h"
+#undef V8_DISABLE_DEPRECATIONS


 using ::v8::internal::EmbeddedVector;

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to