Index: src/mark-compact.cc |
=================================================================== |
--- src/mark-compact.cc (revision 10086) |
+++ src/mark-compact.cc (working copy) |
@@ -2565,6 +2565,10 @@ |
ASSERT(target_space == heap()->old_pointer_space() || |
target_space == heap()->old_data_space()); |
MaybeObject* maybe_result = target_space->AllocateRaw(object_size); |
+ if (maybe_result->IsFailure()) { |
Vyacheslav Egorov (Chromium)
2011/11/30 10:34:43
I don't think you need this. (also you can move Ex
|
+ target_space->Expand(); |
+ maybe_result = target_space->AllocateRaw(object_size); |
+ } |
if (maybe_result->ToObject(&result)) { |
HeapObject* target = HeapObject::cast(result); |
MigrateObject(target->address(), |
@@ -2582,6 +2586,10 @@ |
void MarkCompactCollector::EvacuateNewSpace() { |
+ // There are soft limits in the allocation code, designed trigger a mark |
+ // sweep collection by failing allocations. But since we are already in |
+ // a mark-sweep allocation, there is no sense in trying to trigger one. |
+ AlwaysAllocateScope scope; |
heap()->CheckNewSpaceExpansionCriteria(); |
NewSpace* new_space = heap()->new_space(); |