Index: src/spaces-inl.h |
diff --git a/src/spaces-inl.h b/src/spaces-inl.h |
index 08a6171ceef1de63f29571433c3738ceb3d876e2..41a40683387e0a0f9a68bc4dee81b96a93599ac9 100644 |
--- a/src/spaces-inl.h |
+++ b/src/spaces-inl.h |
@@ -202,11 +202,18 @@ HeapObject* PagedSpace::AllocateLinearly(AllocationInfo* alloc_info, |
MaybeObject* PagedSpace::AllocateRaw(int size_in_bytes) { |
ASSERT(HasBeenSetup()); |
ASSERT_OBJECT_SIZE(size_in_bytes); |
+ |
HeapObject* object = AllocateLinearly(&allocation_info_, size_in_bytes); |
- if (object != NULL) return object; |
+ if (object != NULL) { |
+ IncrementalMarking::Step(size_in_bytes); |
+ return object; |
+ } |
object = SlowAllocateRaw(size_in_bytes); |
- if (object != NULL) return object; |
+ if (object != NULL) { |
+ IncrementalMarking::Step(size_in_bytes); |
+ return object; |
+ } |
return Failure::RetryAfterGC(identity()); |
} |
@@ -229,6 +236,9 @@ MaybeObject* NewSpace::AllocateRawInternal(int size_in_bytes, |
&& alloc_info->top <= space->high() |
&& alloc_info->limit == space->high()); |
#endif |
+ |
+ IncrementalMarking::Step(size_in_bytes); |
+ |
return obj; |
} |