| Index: test/cctest/test-heap.cc
|
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
|
| index 54ddff17500d67e2ff8e7fd542924856bc44da8c..34d8b9e7a4e0841342454e41e7ccca9f11684f63 100644
|
| --- a/test/cctest/test-heap.cc
|
| +++ b/test/cctest/test-heap.cc
|
| @@ -2531,6 +2531,9 @@ TEST(OptimizedPretenuringConstructorCalls) {
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| i::ScopedVector<char> source(1024);
|
| + // Call new is doing slack tracking for the first
|
| + // JSFunction::kGenerousAllocationCount allocations, and we can't find
|
| + // mementos during that time.
|
| i::OS::SNPrintF(
|
| source,
|
| "var number_elements = %d;"
|
| @@ -2549,7 +2552,8 @@ TEST(OptimizedPretenuringConstructorCalls) {
|
| "f(); f();"
|
| "%%OptimizeFunctionOnNextCall(f);"
|
| "f();",
|
| - AllocationSite::kPretenureMinimumCreated);
|
| + AllocationSite::kPretenureMinimumCreated +
|
| + JSFunction::kGenerousAllocationCount);
|
|
|
| v8::Local<v8::Value> res = CompileRun(source.start());
|
|
|
| @@ -2573,9 +2577,12 @@ TEST(OptimizedPretenuringCallNew) {
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| i::ScopedVector<char> source(1024);
|
| + // Call new is doing slack tracking for the first
|
| + // JSFunction::kGenerousAllocationCount allocations, and we can't find
|
| + // mementos during that time.
|
| i::OS::SNPrintF(
|
| source,
|
| - "var number_elements = 100;"
|
| + "var number_elements = %d;"
|
| "var elements = new Array(number_elements);"
|
| "function g() { this.a = 0; }"
|
| "function f() {"
|
| @@ -2588,7 +2595,8 @@ TEST(OptimizedPretenuringCallNew) {
|
| "f(); f();"
|
| "%%OptimizeFunctionOnNextCall(f);"
|
| "f();",
|
| - AllocationSite::kPretenureMinimumCreated);
|
| + AllocationSite::kPretenureMinimumCreated +
|
| + JSFunction::kGenerousAllocationCount);
|
|
|
| v8::Local<v8::Value> res = CompileRun(source.start());
|
|
|
| @@ -3803,7 +3811,7 @@ TEST(EnsureAllocationSiteDependentCodesProcessed) {
|
| // Now make sure that a gc should get rid of the function, even though we
|
| // still have the allocation site alive.
|
| for (int i = 0; i < 4; i++) {
|
| - heap->CollectAllGarbage(false);
|
| + heap->CollectAllGarbage(Heap::kNoGCFlags);
|
| }
|
|
|
| // The site still exists because of our global handle, but the code is no
|
|
|