| Index: src/heap/spaces.cc
|
| diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
|
| index 6d30f31c7ca2c09196716cd64ef1b5183035fcc1..02c4678307091c9320b19ad38c499ee0f8eebb5b 100644
|
| --- a/src/heap/spaces.cc
|
| +++ b/src/heap/spaces.cc
|
| @@ -1138,26 +1138,13 @@ Object* PagedSpace::FindObject(Address addr) {
|
| }
|
|
|
|
|
| -bool PagedSpace::CanExpand(size_t size) {
|
| - DCHECK(heap()->mark_compact_collector()->is_compacting() ||
|
| - Capacity() <= heap()->MaxOldGenerationSize());
|
| -
|
| - // Are we going to exceed capacity for this space? At this point we can be
|
| - // way over the maximum size because of AlwaysAllocate scopes and large
|
| - // objects.
|
| - if (!heap()->CanExpandOldGeneration(static_cast<int>(size))) return false;
|
| -
|
| - return true;
|
| -}
|
| -
|
| -
|
| bool PagedSpace::Expand() {
|
| - intptr_t size = AreaSize();
|
| + int size = AreaSize();
|
| if (snapshotable() && !HasPages()) {
|
| size = Snapshot::SizeOfFirstPage(heap()->isolate(), identity());
|
| }
|
|
|
| - if (!CanExpand(size)) return false;
|
| + if (!heap()->CanExpandOldGeneration(size)) return false;
|
|
|
| Page* p = heap()->isolate()->memory_allocator()->AllocatePage(size, this,
|
| executable());
|
|
|