diff --git a/src/heap/heap.cc b/src/heap/heap.cc index 01fa343651..d549fa35e8 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -6154,13 +6154,14 @@ HeapObjectIterator::HeapObjectIterator( break; } object_iterator_ = space_iterator_->Next()->GetObjectIterator(heap_); + if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) heap_->tp_heap_->ResetIterator(); } HeapObjectIterator::~HeapObjectIterator() { #ifdef DEBUG // Assert that in filtering mode we have iterated through all // objects. Otherwise, heap will be left in an inconsistent state. - if (filtering_ != kNoFiltering) { + if (!V8_ENABLE_THIRD_PARTY_HEAP_BOOL && filtering_ != kNoFiltering) { DCHECK_NULL(object_iterator_); } #endif @@ -6177,6 +6178,7 @@ HeapObject HeapObjectIterator::Next() { } HeapObject HeapObjectIterator::NextObject() { + if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) return heap_->tp_heap_->NextObject(); // No iterator means we are done. if (object_iterator_.get() == nullptr) return HeapObject();