Index: test/cctest/test-debug.cc |
=================================================================== |
--- test/cctest/test-debug.cc (revision 1812) |
+++ test/cctest/test-debug.cc (working copy) |
@@ -3427,10 +3427,10 @@ |
void Run(); |
}; |
-static void MessageHandler(const uint16_t* message, int length, |
- v8::Debug::ClientData* client_data) { |
+static void MessageHandler(const v8::Debug::Message& message) { |
static char print_buffer[1000]; |
- Utf16ToAscii(message, length, print_buffer); |
+ v8::String::Value json(message.GetJSON()); |
+ Utf16ToAscii(*json, json.length(), print_buffer); |
if (IsBreakEventMessage(print_buffer)) { |
// Lets test script wait until break occurs to send commands. |
// Signals when a break is reported. |
@@ -3612,10 +3612,8 @@ |
static int handled_client_data_instances_count = 0; |
static void MessageHandlerCountingClientData( |
- const uint16_t* message, |
- int length, |
- v8::Debug::ClientData* client_data) { |
- if (client_data) { |
+ const v8::Debug::Message& message) { |
+ if (message.GetClientData() != NULL) { |
handled_client_data_instances_count++; |
} |
} |
@@ -3691,10 +3689,10 @@ |
} |
-static void ThreadedMessageHandler(const uint16_t* message, int length, |
- v8::Debug::ClientData* client_data) { |
+static void ThreadedMessageHandler(const v8::Debug::Message& message) { |
static char print_buffer[1000]; |
- Utf16ToAscii(message, length, print_buffer); |
+ v8::String::Value json(message.GetJSON()); |
+ Utf16ToAscii(*json, json.length(), print_buffer); |
if (IsBreakEventMessage(print_buffer)) { |
threaded_debugging_barriers.barrier_2.Wait(); |
} |
@@ -3788,11 +3786,10 @@ |
Barriers* breakpoints_barriers; |
-static void BreakpointsMessageHandler(const uint16_t* message, |
- int length, |
- v8::Debug::ClientData* client_data) { |
+static void BreakpointsMessageHandler(const v8::Debug::Message& message) { |
static char print_buffer[1000]; |
- Utf16ToAscii(message, length, print_buffer); |
+ v8::String::Value json(message.GetJSON()); |
+ Utf16ToAscii(*json, json.length(), print_buffer); |
printf("%s\n", print_buffer); |
fflush(stdout); |
@@ -3935,9 +3932,7 @@ |
} |
-static void DummyMessageHandler(const uint16_t* message, |
- int length, |
- v8::Debug::ClientData* client_data) { |
+static void DummyMessageHandler(const v8::Debug::Message& message) { |
} |
@@ -4162,9 +4157,7 @@ |
// Debugger message handler which counts the number of times it is called. |
static int message_handler_hit_count = 0; |
-static void MessageHandlerHitCount(const uint16_t* message, |
- int length, |
- v8::Debug::ClientData* client_data) { |
+static void MessageHandlerHitCount(const v8::Debug::Message& message) { |
message_handler_hit_count++; |
const int kBufferSize = 1000; |
@@ -4213,9 +4206,7 @@ |
// Debugger message handler which clears the message handler while active. |
static void MessageHandlerClearingMessageHandler( |
- const uint16_t* message, |
- int length, |
- v8::Debug::ClientData* client_data) { |
+ const v8::Debug::Message& message) { |
message_handler_hit_count++; |
// Clear debug message handler. |
@@ -4262,11 +4253,10 @@ |
Barriers* host_dispatch_barriers; |
-static void HostDispatchMessageHandler(const uint16_t* message, |
- int length, |
- v8::Debug::ClientData* client_data) { |
+static void HostDispatchMessageHandler(const v8::Debug::Message& message) { |
static char print_buffer[1000]; |
- Utf16ToAscii(message, length, print_buffer); |
+ v8::String::Value json(message.GetJSON()); |
+ Utf16ToAscii(*json, json.length(), print_buffer); |
printf("%s\n", print_buffer); |
fflush(stdout); |
} |