Index: test/cctest/test-heap.cc |
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc |
index 6d4da76240052db2fadc1097e19a3513a19a3378..bdad930fd7ceaae0a650efd1aa19c0ffef0413b8 100644 |
--- a/test/cctest/test-heap.cc |
+++ b/test/cctest/test-heap.cc |
@@ -2200,6 +2200,11 @@ TEST(OptimizedPretenuringAllocationFolding) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2244,6 +2249,11 @@ TEST(OptimizedPretenuringObjectArrayLiterals) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2279,6 +2289,12 @@ TEST(OptimizedPretenuringMixedInObjectProperties) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2320,6 +2336,11 @@ TEST(OptimizedPretenuringDoubleArrayProperties) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2355,6 +2376,11 @@ TEST(OptimizedPretenuringdoubleArrayLiterals) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2390,6 +2416,11 @@ TEST(OptimizedPretenuringNestedMixedArrayLiterals) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2434,6 +2465,11 @@ TEST(OptimizedPretenuringNestedObjectLiterals) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2478,6 +2514,11 @@ TEST(OptimizedPretenuringNestedDoubleLiterals) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
i::OS::SNPrintF( |
source, |
@@ -2530,6 +2571,11 @@ TEST(OptimizedPretenuringConstructorCalls) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
// Call new is doing slack tracking for the first |
// JSFunction::kGenerousAllocationCount allocations, and we can't find |
@@ -2576,6 +2622,11 @@ TEST(OptimizedPretenuringCallNew) { |
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; |
v8::HandleScope scope(CcTest::isolate()); |
+ // Grow new space unitl maximum capacity reached. |
+ while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) { |
+ CcTest::heap()->new_space()->Grow(); |
+ } |
+ |
i::ScopedVector<char> source(1024); |
// Call new is doing slack tracking for the first |
// JSFunction::kGenerousAllocationCount allocations, and we can't find |