| Index: test/cctest/cctest.h
|
| diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
|
| index 5c19195208eaaa88b3647c0559dab2691ce9f2f3..61e3c962842c6edc8e3431048ba2aa20d8aca535 100644
|
| --- a/test/cctest/cctest.h
|
| +++ b/test/cctest/cctest.h
|
| @@ -555,7 +555,8 @@ static inline void SimulateFullSpace(v8::internal::PagedSpace* space) {
|
|
|
| // Helper function that simulates many incremental marking steps until
|
| // marking is completed.
|
| -static inline void SimulateIncrementalMarking(i::Heap* heap) {
|
| +static inline void SimulateIncrementalMarking(i::Heap* heap,
|
| + bool force_completion = true) {
|
| i::MarkCompactCollector* collector = heap->mark_compact_collector();
|
| i::IncrementalMarking* marking = heap->incremental_marking();
|
| if (collector->sweeping_in_progress()) {
|
| @@ -566,6 +567,8 @@ static inline void SimulateIncrementalMarking(i::Heap* heap) {
|
| marking->Start(i::Heap::kNoGCFlags);
|
| }
|
| CHECK(marking->IsMarking());
|
| + if (!force_completion) return;
|
| +
|
| while (!marking->IsComplete()) {
|
| marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD);
|
| if (marking->IsReadyToOverApproximateWeakClosure()) {
|
|
|