Index: src/heap/array-buffer-tracker.cc |
diff --git a/src/heap/array-buffer-tracker.cc b/src/heap/array-buffer-tracker.cc |
index 271c2821f57207b4e26683991bdda82bcd92e472..a870b35ec50fa5db2b0c7adc23e9a3ef58859e70 100644 |
--- a/src/heap/array-buffer-tracker.cc |
+++ b/src/heap/array-buffer-tracker.cc |
@@ -75,10 +75,8 @@ void LocalArrayBufferTracker::Process(Callback callback) { |
void ArrayBufferTracker::FreeDeadInNewSpace(Heap* heap) { |
DCHECK_EQ(heap->gc_state(), Heap::HeapState::SCAVENGE); |
- NewSpacePageIterator from_it(heap->new_space()->FromSpaceStart(), |
- heap->new_space()->FromSpaceEnd()); |
- while (from_it.has_next()) { |
- Page* page = from_it.next(); |
+ for (Page* page : NewSpacePageRange(heap->new_space()->FromSpaceStart(), |
+ heap->new_space()->FromSpaceEnd())) { |
bool empty = ProcessBuffers(page, kUpdateForwardedRemoveOthers); |
CHECK(empty); |
} |