| Index: src/spaces-inl.h
|
| diff --git a/src/spaces-inl.h b/src/spaces-inl.h
|
| index eba52c694919df382a527454c2cffef6f064e5c8..f77d90af92dd012777b4b53cc89aaab431eaf225 100644
|
| --- a/src/spaces-inl.h
|
| +++ b/src/spaces-inl.h
|
| @@ -253,26 +253,19 @@ HeapObject* PagedSpace::AllocateLinearly(int size_in_bytes) {
|
| // Raw allocation.
|
| AllocationResult PagedSpace::AllocateRaw(int size_in_bytes) {
|
| HeapObject* object = AllocateLinearly(size_in_bytes);
|
| - if (object != NULL) {
|
| - if (identity() == CODE_SPACE) {
|
| - SkipList::Update(object->address(), size_in_bytes);
|
| - }
|
| - return object;
|
| - }
|
|
|
| - ASSERT(!heap()->linear_allocation() ||
|
| + ASSERT((object == NULL) ||
|
| + !heap()->linear_allocation() ||
|
| (anchor_.next_chunk() == &anchor_ &&
|
| anchor_.prev_chunk() == &anchor_));
|
|
|
| - object = free_list_.Allocate(size_in_bytes);
|
| - if (object != NULL) {
|
| - if (identity() == CODE_SPACE) {
|
| - SkipList::Update(object->address(), size_in_bytes);
|
| + if (object == NULL) {
|
| + object = free_list_.Allocate(size_in_bytes);
|
| + if (object == NULL) {
|
| + object = SlowAllocateRaw(size_in_bytes);
|
| }
|
| - return object;
|
| }
|
|
|
| - object = SlowAllocateRaw(size_in_bytes);
|
| if (object != NULL) {
|
| if (identity() == CODE_SPACE) {
|
| SkipList::Update(object->address(), size_in_bytes);
|
|
|