| Index: src/heap/spaces-inl.h
|
| diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
|
| index 8a79ad027516270b3c9c921b6aa3eb24b11d9bbb..135498f69d180b6057e4d89b4d64afc1fb7905bf 100644
|
| --- a/src/heap/spaces-inl.h
|
| +++ b/src/heap/spaces-inl.h
|
| @@ -251,6 +251,19 @@ AllocationSpace AllocationResult::RetrySpace() {
|
| return static_cast<AllocationSpace>(Smi::cast(object_)->value());
|
| }
|
|
|
| +NewSpacePage* NewSpacePage::Initialize(Heap* heap, MemoryChunk* chunk,
|
| + Executability executable,
|
| + SemiSpace* owner) {
|
| + DCHECK_EQ(executable, Executability::NOT_EXECUTABLE);
|
| + bool in_to_space = (owner->id() != kFromSpace);
|
| + chunk->SetFlag(in_to_space ? MemoryChunk::IN_TO_SPACE
|
| + : MemoryChunk::IN_FROM_SPACE);
|
| + DCHECK(!chunk->IsFlagSet(in_to_space ? MemoryChunk::IN_FROM_SPACE
|
| + : MemoryChunk::IN_TO_SPACE));
|
| + NewSpacePage* page = static_cast<NewSpacePage*>(chunk);
|
| + heap->incremental_marking()->SetNewSpacePageFlags(page);
|
| + return page;
|
| +}
|
|
|
| // --------------------------------------------------------------------------
|
| // PagedSpace
|
| @@ -261,6 +274,7 @@ Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable,
|
| page->mutex_ = new base::Mutex();
|
| DCHECK(page->area_size() <= kAllocatableMemory);
|
| DCHECK(chunk->owner() == owner);
|
| +
|
| owner->IncreaseCapacity(page->area_size());
|
| heap->incremental_marking()->SetOldSpacePageFlags(chunk);
|
|
|
|
|