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

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

Issue 642863007: [V8] Send AfterCompile and CompileError messages in debug scope (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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.cc ('k') | test/mjsunit/debug-clearbreakpointgroup.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 575f938594cbe6f9011d89c11838af29cefc9c9d..ae5f49aa40041da453dd1a354ece464f9d796f11 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -4863,6 +4863,19 @@ bool IsEvaluateResponseMessage(char* message) {
}
+// We match parts of the message to decide if it is a after compile message.
+bool IsCompileEventMessage(char* message) {
+ const char* type_event = "\"type\":\"event\"";
+ const char* event_after_compile = "\"event\":\"afterCompile\"";
+ const char* event_compile_error = "\"event\":\"compileError\"";
+ // Does the message contain both type:event and event:afterCompile or
+ // event:compileError ?
+ return strstr(message, type_event) != NULL &&
+ (strstr(message, event_after_compile) != NULL ||
+ strstr(message, event_compile_error) != NULL);
+}
+
+
static int StringToInt(const char* s) {
return atoi(s); // NOLINT
}
@@ -4946,6 +4959,8 @@ static void MessageHandler(const v8::Debug::Message& message) {
message_queue_barriers.semaphore_2.Signal();
}
+ if (IsCompileEventMessage(*utf8)) return;
+
// Allow message handler to block on a semaphore, to test queueing of
// messages while blocked.
message_queue_barriers.semaphore_1.Wait();
« no previous file with comments | « src/debug.cc ('k') | test/mjsunit/debug-clearbreakpointgroup.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698