| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index be9938b4a1b5eb9ef06f597728a39a0f53dc5fbf..5b29c2175bcbe8da570801bee4ef399ff6fa88c4 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -3131,6 +3131,10 @@ bool MarkCompactCollector::TryPromoteObject(HeapObject* object,
|
| #endif
|
| if (allocation.To(&target)) {
|
| MigrateObject(target, object, object_size, old_space->identity());
|
| + // If we end up needing more special cases, we should factor this out.
|
| + if (V8_UNLIKELY(target->IsJSArrayBuffer())) {
|
| + heap()->PromoteArrayBuffer(target);
|
| + }
|
| heap()->IncrementPromotedObjectsSize(object_size);
|
| return true;
|
| }
|
| @@ -4437,7 +4441,6 @@ void MarkCompactCollector::SweepSpaces() {
|
| #ifdef DEBUG
|
| state_ = SWEEP_SPACES;
|
| #endif
|
| - heap()->FreeDeadArrayBuffers();
|
|
|
| MoveEvacuationCandidatesToEndOfPagesList();
|
|
|
| @@ -4465,6 +4468,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.
|
|
|