Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 4451b5a6a5bc824c4fd2b5378ab99a3fce62c46c..fb1aca0b1fdfd22ce86e522c363f3a23cd1a35cf 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -4067,21 +4067,8 @@ AllocationResult Heap::AllocateStruct(InstanceType type) { |
} |
-bool Heap::IsHeapIterable() { |
- // TODO(hpayer): This function is not correct. Allocation folding in old |
- // space breaks the iterability. |
- return new_space_top_after_last_gc_ == new_space()->top(); |
-} |
- |
- |
void Heap::MakeHeapIterable() { |
Hannes Payer (out of office)
2017/02/10 07:37:18
FYI: We do not need to wait for sweepers to make t
|
- DCHECK(AllowHeapAllocation::IsAllowed()); |
- if (!IsHeapIterable()) { |
- CollectAllGarbage(kMakeHeapIterableMask, |
- GarbageCollectionReason::kMakeHeapIterable); |
- } |
mark_compact_collector()->EnsureSweepingCompleted(); |
- DCHECK(IsHeapIterable()); |
} |
@@ -6117,16 +6104,15 @@ class UnreachableObjectsFilter : public HeapObjectsFilter { |
DisallowHeapAllocation no_allocation_; |
}; |
- |
HeapIterator::HeapIterator(Heap* heap, |
HeapIterator::HeapObjectsFiltering filtering) |
- : make_heap_iterable_helper_(heap), |
- no_heap_allocation_(), |
+ : no_heap_allocation_(), |
heap_(heap), |
filtering_(filtering), |
filter_(nullptr), |
space_iterator_(nullptr), |
object_iterator_(nullptr) { |
+ heap_->MakeHeapIterable(); |
heap_->heap_iterator_start(); |
// Start the iteration. |
space_iterator_ = new SpaceIterator(heap_); |