| Index: test/cctest/heap/test-heap.cc
|
| diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
|
| index 784c8f0fb6a5beaf4e3db40c30c443f49fe4f310..57de3f0d181db2bb3700da18f8552499cd5bb519 100644
|
| --- a/test/cctest/heap/test-heap.cc
|
| +++ b/test/cctest/heap/test-heap.cc
|
| @@ -5555,19 +5555,21 @@ UNINITIALIZED_TEST(Regress538257) {
|
| isolate->Enter();
|
| {
|
| i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| + Heap* heap = i_isolate->heap();
|
| HandleScope handle_scope(i_isolate);
|
| - PagedSpace* old_space = i_isolate->heap()->old_space();
|
| + PagedSpace* old_space = heap->old_space();
|
| const int kMaxObjects = 10000;
|
| const int kFixedArrayLen = 512;
|
| Handle<FixedArray> objects[kMaxObjects];
|
| - for (int i = 0; (i < kMaxObjects) && old_space->CanExpand(Page::kPageSize);
|
| + for (int i = 0; (i < kMaxObjects) &&
|
| + heap->CanExpandOldGeneration(old_space->AreaSize());
|
| i++) {
|
| objects[i] = i_isolate->factory()->NewFixedArray(kFixedArrayLen, TENURED);
|
| Page::FromAddress(objects[i]->address())
|
| ->SetFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING);
|
| }
|
| SimulateFullSpace(old_space);
|
| - i_isolate->heap()->CollectGarbage(OLD_SPACE);
|
| + heap->CollectGarbage(OLD_SPACE);
|
| // If we get this far, we've successfully aborted compaction. Any further
|
| // allocations might trigger OOM.
|
| }
|
|
|