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

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

Issue 414036: Reimplement logging of API callbacks entry points in an easier way. (Closed)
Patch Set: Final version Created 11 years, 1 month 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/log.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-log.cc
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index 8e3b5f4b58e18a12765d9ad34abb0ca383bb934f..c1ad7f55f3a3d15d45ed2c112c445d3eceef31dd 100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -510,18 +510,22 @@ TEST(LogCallbacks) {
signature),
static_cast<v8::PropertyAttribute>(v8::DontDelete));
- i::Logger::LogCallbacks();
+ env->Global()->Set(v8_str("Obj"), obj->GetFunction());
+ CompileAndRunScript("Obj.prototype.method1.toString();");
+
+ i::Logger::LogCompiledFunctions();
log_pos = GetLogLines(log_pos, &buffer);
CHECK_GT(log_pos, 0);
buffer[log_pos] = 0;
const char* callback_rec = "code-creation,Callback,";
- const char* pos = strstr(buffer.start(), callback_rec);
+ char* pos = strstr(buffer.start(), callback_rec);
CHECK_NE(NULL, pos);
pos += strlen(callback_rec);
EmbeddedVector<char, 100> ref_data;
i::OS::SNPrintF(ref_data,
- "0x%" V8PRIxPTR ",0,\"Obj.method1\"\n", ObjMethod1);
+ "0x%" V8PRIxPTR ",0,\"method1\"", ObjMethod1);
+ *(pos + strlen(ref_data.start())) = '\0';
CHECK_EQ(ref_data.start(), pos);
obj.Dispose();
« no previous file with comments | « src/log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698