Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index c7e4d8f29a6cd9c60f1882bb945f0be518a6f256..74d03b3884f92e09b5cc238be8350de895c502d8 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -833,7 +833,7 @@ void MarkCompactCollector::Prepare() { |
space = spaces.next()) { |
space->PrepareForMarkCompact(); |
} |
- heap()->account_external_memory_concurrently_freed(); |
+ heap()->array_buffer_tracker()->AccountForConcurrentlyFreedMemory(); |
#ifdef VERIFY_HEAP |
if (!was_marked_incrementally_ && FLAG_verify_heap) { |
@@ -3132,7 +3132,8 @@ bool MarkCompactCollector::Evacuator::EvacuatePage(Page* page) { |
case kObjectsNewToOld: |
success = collector_->VisitLiveObjects(page, &new_space_visitor_, |
kClearMarkbits); |
- ArrayBufferTracker::ProcessBuffers( |
+ |
+ heap->array_buffer_tracker()->ProcessBuffers( |
page, ArrayBufferTracker::kUpdateForwardedRemoveOthers); |
DCHECK(success); |
break; |
@@ -3159,14 +3160,14 @@ bool MarkCompactCollector::Evacuator::EvacuatePage(Page* page) { |
EvacuateRecordOnlyVisitor record_visitor(collector_->heap()); |
success = |
collector_->VisitLiveObjects(page, &record_visitor, kKeepMarking); |
- ArrayBufferTracker::ProcessBuffers( |
+ heap->array_buffer_tracker()->ProcessBuffers( |
page, ArrayBufferTracker::kUpdateForwardedKeepOthers); |
DCHECK(success); |
// We need to return failure here to indicate that we want this page |
// added to the sweeper. |
success = false; |
} else { |
- ArrayBufferTracker::ProcessBuffers( |
+ heap->array_buffer_tracker()->ProcessBuffers( |
page, ArrayBufferTracker::kUpdateForwardedRemoveOthers); |
} |
break; |
@@ -3370,7 +3371,7 @@ int MarkCompactCollector::Sweeper::RawSweep( |
// Before we sweep objects on the page, we free dead array buffers which |
// requires valid mark bits. |
- ArrayBufferTracker::FreeDead(p); |
+ p->heap()->array_buffer_tracker()->FreeDead(p); |
Address free_start = p->area_start(); |
DCHECK(reinterpret_cast<intptr_t>(free_start) % (32 * kPointerSize) == 0); |
@@ -3937,7 +3938,7 @@ void MarkCompactCollector::StartSweepSpace(PagedSpace* space) { |
PrintIsolate(isolate(), "sweeping: released page: %p", |
static_cast<void*>(p)); |
} |
- ArrayBufferTracker::FreeAll(p); |
+ heap()->array_buffer_tracker()->FreeAll(p); |
space->ReleasePage(p); |
continue; |
} |