Revision: 21295
Author:   [email protected]
Date:     Wed May 14 08:07:21 2014 UTC
Log:      Rename debug API methods.

[email protected]

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

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

=======================================
--- /branches/bleeding_edge/include/v8-debug.h  Fri May  9 09:24:32 2014 UTC
+++ /branches/bleeding_edge/include/v8-debug.h  Wed May 14 08:07:21 2014 UTC
@@ -137,7 +137,10 @@
    * 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 @@
    * 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 @@
   }

   // 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,
=======================================
--- /branches/bleeding_edge/src/api.cc  Mon May 12 20:10:47 2014 UTC
+++ /branches/bleeding_edge/src/api.cc  Wed May 14 08:07:21 2014 UTC
@@ -6778,10 +6778,10 @@

 // --- 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::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);
=======================================
--- /branches/bleeding_edge/src/d8.cc   Tue May 13 08:31:27 2014 UTC
+++ /branches/bleeding_edge/src/d8.cc   Wed May 14 08:07:21 2014 UTC
@@ -797,7 +797,7 @@

   // 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
=======================================
--- /branches/bleeding_edge/src/debug.cc        Mon May 12 13:47:01 2014 UTC
+++ /branches/bleeding_edge/src/debug.cc        Wed May 14 08:07:21 2014 UTC
@@ -3180,7 +3180,7 @@
 }


-void Debugger::SetMessageHandler(v8::Debug::MessageHandler2 handler) {
+void Debugger::SetMessageHandler(v8::Debug::MessageHandler handler) {
   LockGuard<RecursiveMutex> with(&debugger_access_);

   message_handler_ = handler;
=======================================
--- /branches/bleeding_edge/src/debug.h Mon May 12 13:47:01 2014 UTC
+++ /branches/bleeding_edge/src/debug.h Wed May 14 08:07:21 2014 UTC
@@ -782,7 +782,7 @@
                             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 @@
   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.
=======================================
--- /branches/bleeding_edge/test/cctest/test-debug.cc Fri May 9 09:24:32 2014 UTC +++ /branches/bleeding_edge/test/cctest/test-debug.cc Wed May 14 08:07:21 2014 UTC
@@ -1094,7 +1094,7 @@
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
   v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
"function foo(){bar=0;}"))->Run();
   v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast(
@@ -1116,7 +1116,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(2, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1126,7 +1126,7 @@
   break_point_hit_count = 0;
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
   v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), "bar=1"))
       ->Run();
   v8::Script::Compile(
@@ -1151,7 +1151,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(2, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1161,7 +1161,7 @@
   break_point_hit_count = 0;
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
   v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){}"))->Run();
   v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
@@ -1185,7 +1185,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(2, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1195,7 +1195,7 @@
   break_point_hit_count = 0;
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointCollectGarbage);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointCollectGarbage);
   v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){return 1;}"))
       ->Run();
@@ -1221,7 +1221,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(2, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1231,7 +1231,7 @@
   break_point_hit_count = 0;
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointCollectGarbage);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointCollectGarbage);
   v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
"function bar(){ this.x = 1;}"))
       ->Run();
@@ -1257,7 +1257,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(2, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1278,7 +1278,7 @@
                                         "frame_source_column");


-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
   v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function foo(){}"))->Run();
   v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast(
@@ -1304,7 +1304,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(2, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1327,7 +1327,7 @@
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointCollectGarbage);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointCollectGarbage);
   v8::Local<v8::Function> foo;

   // Test IC store break point with garbage collection.
@@ -1355,7 +1355,7 @@
   SetBreakPoint(foo, 0);
   CallWithBreakPoints(env->Global(), foo, 1, 25);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1390,7 +1390,7 @@
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
   v8::Local<v8::Function> foo;

   // Test IC store break point with garbage collection.
@@ -1436,7 +1436,7 @@
   CallAndGC(env->Global(), foo);


-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1448,7 +1448,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
   v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){}"))->Run();
   v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
@@ -1490,7 +1490,7 @@
   foo->Run();
   CHECK_EQ(8, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Make sure that the break point numbers are consecutive.
@@ -1507,7 +1507,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::String> script = v8::String::NewFromUtf8(
     env->GetIsolate(),
@@ -1592,7 +1592,7 @@
   g->Call(env->Global(), 0, NULL);
   CHECK_EQ(0, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Make sure that the break point numbers are consecutive.
@@ -1611,7 +1611,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::String> source = v8::String::NewFromUtf8(
     env->GetIsolate(),
@@ -1700,7 +1700,7 @@
   g->Call(env->Global(), 0, NULL);
   CHECK_EQ(0, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Make sure that the break point numbers are consecutive.
@@ -1720,7 +1720,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::String> script = v8::String::NewFromUtf8(
     env->GetIsolate(),
@@ -1766,7 +1766,7 @@
   f->Call(env->Global(), 0, NULL);
   CHECK_EQ(3, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1778,7 +1778,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::String> script = v8::String::NewFromUtf8(
     env->GetIsolate(),
@@ -1829,7 +1829,7 @@
   }
   CHECK_EQ(5, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1841,7 +1841,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::String> script = v8::String::NewFromUtf8(
     env->GetIsolate(),
@@ -1885,7 +1885,7 @@
   }
   CHECK_EQ(5, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1897,7 +1897,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::Function> f;
   v8::Local<v8::String> script = v8::String::NewFromUtf8(
@@ -1949,7 +1949,7 @@
   f->Call(env->Global(), 0, NULL);
   CHECK_EQ(1, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -1961,7 +1961,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::Function> f;
   v8::Local<v8::String> script_f =
@@ -2018,7 +2018,7 @@
   g->Call(env->Global(), 0, NULL);
   CHECK_EQ(2, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2030,7 +2030,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::Function> f;
   v8::Local<v8::String> script = v8::String::NewFromUtf8(
@@ -2078,7 +2078,7 @@
   f->Call(env->Global(), 0, NULL);
   CHECK_EQ(1, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2094,7 +2094,7 @@
                                         frame_function_name_source,
                                         "frame_function_name");

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::Function> f;
   v8::Local<v8::Function> g;
@@ -2194,7 +2194,7 @@
   v8::Script::Compile(script, &origin)->Run();
   CHECK_EQ(0, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2205,7 +2205,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::String> script =
       v8::String::NewFromUtf8(env->GetIsolate(),
@@ -2241,7 +2241,7 @@
       env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "f")));
   CHECK_EQ(0, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2253,7 +2253,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   v8::Local<v8::String> script_source =
       v8::String::NewFromUtf8(env->GetIsolate(),
@@ -2276,7 +2276,7 @@
   ClearBreakPointFromJS(env->GetIsolate(), sbp1);
   ClearBreakPointFromJS(env->GetIsolate(), sbp2);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2292,7 +2292,7 @@
   debug_event_remove_break_point = SetBreakPoint(foo, 0);

   // Register the debug event listener pasing the function
-  v8::Debug::SetDebugEventListener2(DebugEventRemoveBreakPoint, foo);
+  v8::Debug::SetDebugEventListener(DebugEventRemoveBreakPoint, foo);

   break_point_hit_count = 0;
   foo->Call(env->Global(), 0, NULL);
@@ -2302,7 +2302,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(0, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2312,7 +2312,7 @@
   break_point_hit_count = 0;
   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
   v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function bar(){debugger}"))
       ->Run();
@@ -2332,7 +2332,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(3, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2342,7 +2342,7 @@
     break_point_hit_count = 0;
     DebugLocalContext env;
     v8::HandleScope scope(env->GetIsolate());
-    v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+    v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);
     v8::Script::Compile(
v8::String::NewFromUtf8(env->GetIsolate(), "function foo(){debugger;}"))
         ->Run();
@@ -2360,7 +2360,7 @@
     CHECK_EQ(2, break_point_hit_count);

     ClearBreakPoint(bp);
-    v8::Debug::SetDebugEventListener2(NULL);
+    v8::Debug::SetDebugEventListener(NULL);
     CheckDebuggerUnloaded();
 }

@@ -2378,7 +2378,7 @@
                                             evaluate_check_source,
                                             "evaluate_check");
   // Register the debug event listener
-  v8::Debug::SetDebugEventListener2(DebugEventEvaluate);
+  v8::Debug::SetDebugEventListener(DebugEventEvaluate);

// Different expected vaules of x and a when in a break point (u = undefined,
   // d = Hello, world!).
@@ -2479,7 +2479,7 @@
   };
   bar->Call(env->Global(), 2, argv_bar_3);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2497,7 +2497,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(CheckDebugEvent);
+  v8::Debug::SetDebugEventListener(CheckDebugEvent);

   v8::Local<v8::Function> foo = CompileFunction(&env,
     "function foo(x) {\n"
@@ -2514,7 +2514,7 @@
   foo->Call(env->Global(), 0, NULL);
   CHECK_EQ(1, debugEventCount);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2544,7 +2544,7 @@
   v8::HandleScope scope(env->GetIsolate());
   env.ExposeDebug();

-  v8::Debug::SetDebugEventListener2(CheckDebugEval);
+  v8::Debug::SetDebugEventListener(CheckDebugEval);

   v8::Local<v8::Function> foo = CompileFunction(&env,
     "var global = 'Global';\n"
@@ -2572,7 +2572,7 @@

   checkGlobalEvalFunction.Clear();
   checkFrameEvalFunction.Clear();
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2677,7 +2677,7 @@
// Test that the evaluation of expressions works even from ProcessDebugMessages
 // i.e. with empty stack.
 TEST(DebugEvaluateWithoutStack) {
-  v8::Debug::SetMessageHandler2(DebugProcessDebugMessagesHandler);
+  v8::Debug::SetMessageHandler(DebugProcessDebugMessagesHandler);

   DebugLocalContext env;
   v8::HandleScope scope(env->GetIsolate());
@@ -2733,8 +2733,8 @@
            0);
CHECK_EQ(strcmp("805", process_debug_messages_data.results[2].buffer), 0);

-  v8::Debug::SetMessageHandler2(NULL);
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetMessageHandler(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2755,7 +2755,7 @@
   SetBreakPoint(foo, 3);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   step_action = StepIn;
   break_point_hit_count = 0;
@@ -2764,11 +2764,11 @@
   // With stepping all break locations are hit.
   CHECK_EQ(4, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Register a debug event listener which just counts.
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   SetBreakPoint(foo, 3);
   break_point_hit_count = 0;
@@ -2777,7 +2777,7 @@
   // Without stepping only active break points are hit.
   CHECK_EQ(1, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2788,7 +2788,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

// Create a function for testing stepping of keyed load. The statement 'y=1' // is there to have more than one breakable statement in the loop, TODO(315).
@@ -2826,7 +2826,7 @@
   // With stepping all break locations are hit.
   CHECK_EQ(35, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2837,7 +2837,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

// Create a function for testing stepping of keyed store. The statement 'y=1' // is there to have more than one breakable statement in the loop, TODO(315).
@@ -2874,7 +2874,7 @@
   // With stepping all break locations are hit.
   CHECK_EQ(34, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2885,7 +2885,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping of named load.
   v8::Local<v8::Function> foo = CompileFunction(
@@ -2918,7 +2918,7 @@
   // With stepping all break locations are hit.
   CHECK_EQ(55, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2928,7 +2928,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping of named store.
   v8::Local<v8::Function> foo = CompileFunction(
@@ -2953,7 +2953,7 @@
   // With stepping all expected break locations are hit.
   CHECK_EQ(expected, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -2970,7 +2970,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping.
   v8::Local<v8::Function> foo = CompileFunction(&env,
@@ -2993,11 +2993,11 @@
   // With stepping all break locations are hit.
   CHECK_EQ(11, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Register a debug event listener which just counts.
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   SetBreakPoint(foo, 0);
   break_point_hit_count = 0;
@@ -3006,7 +3006,7 @@
   // Without stepping only active break points are hit.
   CHECK_EQ(1, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3016,7 +3016,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3039,7 +3039,7 @@
   CHECK_EQ(6, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3049,7 +3049,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3072,7 +3072,7 @@
   CHECK_EQ(6, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3083,7 +3083,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3116,7 +3116,7 @@
   CHECK_EQ(5, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3127,7 +3127,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3173,7 +3173,7 @@
   CHECK_EQ(7, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3184,7 +3184,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3214,7 +3214,7 @@
   CHECK_EQ(202, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3225,7 +3225,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3255,7 +3255,7 @@
   CHECK_EQ(202, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3266,7 +3266,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3297,7 +3297,7 @@
   CHECK_EQ(203, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3308,7 +3308,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3349,7 +3349,7 @@
   CHECK_EQ(457, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3360,7 +3360,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3402,7 +3402,7 @@
   CHECK_EQ(505, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3412,7 +3412,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3450,7 +3450,7 @@
   CHECK_EQ(8, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3460,7 +3460,7 @@
   v8::HandleScope scope(env->GetIsolate());

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3482,7 +3482,7 @@
   CHECK_EQ(4, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3493,7 +3493,7 @@
   v8::HandleScope scope(isolate);

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3519,7 +3519,7 @@
   CHECK_EQ(5, break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3534,7 +3534,7 @@
                                         "frame_function_name");

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStepSequence);
+  v8::Debug::SetDebugEventListener(DebugEventStepSequence);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3570,7 +3570,7 @@
            break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3585,7 +3585,7 @@
                                         "frame_function_name");

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStepSequence);
+  v8::Debug::SetDebugEventListener(DebugEventStepSequence);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3622,7 +3622,7 @@
            break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded(true);
 }

@@ -3637,7 +3637,7 @@
                                         "frame_function_name");

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStepSequence);
+  v8::Debug::SetDebugEventListener(DebugEventStepSequence);

   // Create a function for testing stepping. Run it to allow it to get
   // optimized.
@@ -3657,7 +3657,7 @@
            break_point_hit_count);

   // Get rid of the debug event listener.
-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3674,7 +3674,7 @@
       "foo");

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   step_action = StepIn;
   break_point_hit_count = 0;
@@ -3683,11 +3683,11 @@
   // With stepping all break locations are hit.
   CHECK_EQ(3, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Register a debug event listener which just counts.
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   break_point_hit_count = 0;
   foo->Call(env->Global(), 0, NULL);
@@ -3695,7 +3695,7 @@
   // Without stepping only active break points are hit.
   CHECK_EQ(1, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3713,7 +3713,7 @@
       "foo");

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);

   step_action = StepIn;
   break_point_hit_count = 0;
@@ -3722,11 +3722,11 @@
   // With stepping all break locations are hit.
   CHECK_EQ(7, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Register a debug event listener which just counts.
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   break_point_hit_count = 0;
   foo->Call(env->Global(), 0, NULL);
@@ -3734,7 +3734,7 @@
   // Without stepping only the debugger statement is hit.
   CHECK_EQ(1, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3759,7 +3759,7 @@
       "foo");

   // Register a debug event listener which steps and counts.
-  v8::Debug::SetDebugEventListener2(DebugEventStep);
+  v8::Debug::SetDebugEventListener(DebugEventStep);
   step_action = StepIn;

   // Check stepping where the if condition in bar is false.
@@ -3774,11 +3774,11 @@
   foo->Call(env->Global(), argc, argv);
   CHECK_EQ(8, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();

   // Register a debug event listener which just counts.
-  v8::Debug::SetDebugEventListener2(DebugEventBreakPointHitCount);
+  v8::Debug::SetDebugEventListener(DebugEventBreakPointHitCount);

   break_point_hit_count = 0;
   foo->Call(env->Global(), 0, NULL);
@@ -3786,7 +3786,7 @@
   // Without stepping only the debugger statement is hit.
   CHECK_EQ(1, break_point_hit_count);

-  v8::Debug::SetDebugEventListener2(NULL);
+  v8::Debug::SetDebugEventListener(NULL);
   CheckDebuggerUnloaded();
 }

@@ -3798,7 +3798,7 @@
   env.ExposeDebug();

   // Register a debug event listener which counts.
-  v8::Debug::SetDebugEventListener2(DebugEventCounter);
+  v8::Debug::SetDebugEventListener(DebugEventCounter);

   // Create a script that returns a function.
   const char* src = "(function (evt) {})";
***The diff for this file has been truncated for email.***

--
--
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/d/optout.

Reply via email to