| Index: test/cctest/heap/heap-utils.cc
|
| diff --git a/test/cctest/heap/heap-utils.cc b/test/cctest/heap/heap-utils.cc
|
| index e1ed8ff15e56cae6a97a323f88ce745680b3bd79..99a2e3d369c91319827c97e3f646930bf79e33c3 100644
|
| --- a/test/cctest/heap/heap-utils.cc
|
| +++ b/test/cctest/heap/heap-utils.cc
|
| @@ -141,20 +141,24 @@ void SimulateFullSpace(v8::internal::NewSpace* space,
|
| }
|
|
|
| void SimulateIncrementalMarking(i::Heap* heap, bool force_completion) {
|
| - i::MarkCompactCollector* collector = heap->mark_compact_collector();
|
| i::IncrementalMarking* marking = heap->incremental_marking();
|
| + i::MarkCompactCollector* collector = heap->mark_compact_collector();
|
| if (collector->sweeping_in_progress()) {
|
| collector->EnsureSweepingCompleted();
|
| }
|
| - CHECK(marking->IsMarking() || marking->IsStopped());
|
| + if (marking->IsSweeping()) {
|
| + marking->FinalizeSweeping();
|
| + }
|
| + CHECK(marking->IsMarking() || marking->IsStopped() || marking->IsComplete());
|
| if (marking->IsStopped()) {
|
| heap->StartIncrementalMarking();
|
| }
|
| - CHECK(marking->IsMarking());
|
| + CHECK(marking->IsMarking() || marking->IsComplete());
|
| if (!force_completion) return;
|
|
|
| while (!marking->IsComplete()) {
|
| - marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD);
|
| + marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
|
| + i::IncrementalMarking::FORCE_COMPLETION);
|
| if (marking->IsReadyToOverApproximateWeakClosure()) {
|
| marking->FinalizeIncrementally();
|
| }
|
|
|