Chromium Code Reviews| Index: src/heap/mark-compact.cc |
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
| index 7e02afa3c9ebe65c982d8dffed41b3819e5574f5..ce996e958042201d726197fdaf31b574f6d30eaa 100644 |
| --- a/src/heap/mark-compact.cc |
| +++ b/src/heap/mark-compact.cc |
| @@ -3106,6 +3106,9 @@ bool MarkCompactCollector::TryPromoteObject(HeapObject* object, |
| #endif |
| if (allocation.To(&target)) { |
| MigrateObject(target, object, object_size, old_space->identity()); |
| + if (target->IsJSArrayBuffer()) { |
| + heap()->PromoteArrayBuffer(JSArrayBuffer::cast(target)); |
|
Hannes Payer (out of office)
2015/05/12 06:33:28
I think we should clean that up together with the
|
| + } |
| heap()->IncrementPromotedObjectsSize(object_size); |
| return true; |
| } |
| @@ -4412,7 +4415,6 @@ void MarkCompactCollector::SweepSpaces() { |
| #ifdef DEBUG |
| state_ = SWEEP_SPACES; |
| #endif |
| - heap()->FreeDeadArrayBuffers(); |
| MoveEvacuationCandidatesToEndOfPagesList(); |
| @@ -4440,6 +4442,8 @@ void MarkCompactCollector::SweepSpaces() { |
| EvacuateNewSpaceAndCandidates(); |
| + heap()->FreeDeadArrayBuffers(false); |
| + |
| // ClearNonLiveReferences depends on precise sweeping of map space to |
| // detect whether unmarked map became dead in this collection or in one |
| // of the previous ones. |