Index: test/cctest/heap/heap-utils.cc |
diff --git a/test/cctest/heap/heap-utils.cc b/test/cctest/heap/heap-utils.cc |
index 4f7d088a9462bdb17e3e9cddde0284d1139e2cb3..96665126832e5e13d30d0b64d71142c44f6510a1 100644 |
--- a/test/cctest/heap/heap-utils.cc |
+++ b/test/cctest/heap/heap-utils.cc |
@@ -170,6 +170,10 @@ void SimulateIncrementalMarking(i::Heap* heap, bool force_completion) { |
} |
void SimulateFullSpace(v8::internal::PagedSpace* space) { |
+ i::MarkCompactCollector* collector = space->heap()->mark_compact_collector(); |
+ if (collector->sweeping_in_progress()) { |
+ collector->EnsureSweepingCompleted(); |
+ } |
space->EmptyAllocationInfo(); |
space->ResetFreeList(); |
space->ClearStats(); |