Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: test/cctest/test-debug.cc

Issue 99122: Changed the debugger message API to receive an object instead of a JSON string (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug-agent.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
===================================================================
--- test/cctest/test-debug.cc (revision 1810)
+++ 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);
}
« no previous file with comments | « src/debug-agent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698