| Index: src/heap/spaces.cc
|
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
|
| index f8d340f18278b3d5ded9deecfe24fe329634bdbe..ae4048f452e820f58f848c7e622b9bb75a779005 100644
|
| --- a/src/heap/spaces.cc
|
| +++ b/src/heap/spaces.cc
|
| @@ -2840,9 +2840,7 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size,
|
| return AllocationResult::Retry(identity());
|
| }
|
|
|
| - if (Size() + object_size > max_capacity_) {
|
| - return AllocationResult::Retry(identity());
|
| - }
|
| + if (!CanAllocateSize(object_size)) return AllocationResult::Retry(identity());
|
|
|
| LargePage* page = heap()->isolate()->memory_allocator()->AllocateLargePage(
|
| object_size, this, executable);
|
|
|