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

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 271683002: DevTools: Unflake test-cpu-profiler/JsNativeJsRuntimeJsSample (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 6cff7424b7bf7bb8fcd79e4400da66baec0861c7..52e0fd652122e2b4137e06101f97367f28846f85 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -1158,9 +1158,12 @@ TEST(FunctionApplySample) {
const v8::CpuProfileNode* testNode =
FindChild(env->GetIsolate(), startNode, "test");
if (testNode) {
- ScopedVector<v8::Handle<v8::String> > names(2);
+ ScopedVector<v8::Handle<v8::String> > names(3);
names[0] = v8::String::NewFromUtf8(env->GetIsolate(), "bar");
names[1] = v8::String::NewFromUtf8(env->GetIsolate(), "apply");
+ // apply calls "get length" before invoking the function itself
+ // and we may get hit into it.
+ names[2] = v8::String::NewFromUtf8(env->GetIsolate(), "get length");
CheckChildrenNames(testNode, names);
}
@@ -1343,7 +1346,11 @@ TEST(JsNativeJsRuntimeJsSample) {
const v8::CpuProfileNode* barNode =
GetChild(env->GetIsolate(), nativeFunctionNode, "bar");
- CHECK_EQ(1, barNode->GetChildrenCount());
+ // The child is in fact a bound foo.
+ // A bound function has a wrapper that may make calls to
+ // other functions e.g. "get length".
+ CHECK_LE(1, barNode->GetChildrenCount());
+ CHECK_GE(2, barNode->GetChildrenCount());
GetChild(env->GetIsolate(), barNode, "foo");
profile->Delete();
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698