| Index: src/heap/spaces.cc
|
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
|
| index d598e7cae90c868f0f6743723db3e2fddf2a05d5..845e2172cf8a5f485e709a7de028b1ee15e47597 100644
|
| --- a/src/heap/spaces.cc
|
| +++ b/src/heap/spaces.cc
|
| @@ -2839,7 +2839,7 @@ HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) {
|
| }
|
| }
|
|
|
| - if (heap()->ShouldExpandOldGenerationOnAllocationFailure() && Expand()) {
|
| + if (heap()->ShouldExpandOldGenerationOnSlowAllocation() && Expand()) {
|
| DCHECK((CountTotalPages() > 1) ||
|
| (static_cast<size_t>(size_in_bytes) <= free_list_.Available()));
|
| return free_list_.Allocate(static_cast<size_t>(size_in_bytes));
|
| @@ -2955,7 +2955,8 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
|
| Executability executable) {
|
| // Check if we want to force a GC before growing the old space further.
|
| // If so, fail the allocation.
|
| - if (!heap()->CanExpandOldGeneration(object_size)) {
|
| + if (!heap()->CanExpandOldGeneration(object_size) ||
|
| + !heap()->ShouldExpandOldGenerationOnSlowAllocation()) {
|
| return AllocationResult::Retry(identity());
|
| }
|
|
|
|
|