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..e554b3535455c2239d443523d169c578c702fa37 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/08 13:39:29
Please don't add any JS type specific functionalit
|
| + } |
| heap()->IncrementPromotedObjectsSize(object_size); |
| return true; |
| } |
| @@ -4412,7 +4415,9 @@ void MarkCompactCollector::SweepSpaces() { |
| #ifdef DEBUG |
| state_ = SWEEP_SPACES; |
| #endif |
| - heap()->FreeDeadArrayBuffers(); |
| + // MarkCompact will always also evacuate the new space. |
| + heap()->FreeDeadArrayBuffers(true); |
| + heap()->FreeDeadArrayBuffers(false); |
| MoveEvacuationCandidatesToEndOfPagesList(); |