Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index d89914f2fe6d4bed943d04609a5f8e6fd13ac2fb..28de72ec465bbd3e7b9798d3c198ccf7539fe4d8 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -15,6 +15,7 @@ |
#include "src/gdb-jit.h" |
#include "src/global-handles.h" |
#include "src/heap/array-buffer-tracker.h" |
+#include "src/heap/concurrent-marking.h" |
#include "src/heap/gc-tracer.h" |
#include "src/heap/incremental-marking.h" |
#include "src/heap/mark-compact-inl.h" |
@@ -847,6 +848,8 @@ void MarkCompactCollector::Prepare() { |
// them here. |
heap()->memory_allocator()->unmapper()->WaitUntilCompleted(); |
+ heap()->concurrent_marking()->EnsureTaskCompleted(); |
+ |
// Clear marking bits if incremental marking is aborted. |
if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) { |
heap()->incremental_marking()->Stop(); |