Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index 3bd76046f57c1d6fc53b1a4fd33c0b4b45bdbcd9..3e3011bd9998cede1ff04dcd179018c4fa8acb54 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -7,6 +7,7 @@ |
#include "src/code-stubs.h" |
#include "src/compilation-cache.h" |
#include "src/conversions.h" |
+#include "src/heap/concurrent-marking.h" |
#include "src/heap/gc-idle-time-handler.h" |
#include "src/heap/gc-tracer.h" |
#include "src/heap/heap-inl.h" |
@@ -545,6 +546,15 @@ void IncrementalMarking::StartMarking() { |
IncrementalMarkingRootMarkingVisitor visitor(this); |
heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |
+ if (FLAG_concurrent_marking) { |
+ ConcurrentMarking* concurrent_marking = heap_->concurrent_marking(); |
+ heap_->mark_compact_collector()->marking_deque()->Iterate( |
+ [concurrent_marking](HeapObject* obj) { |
+ concurrent_marking->AddRoot(obj); |
+ }); |
+ concurrent_marking->StartTask(); |
+ } |
+ |
// Ready to start incremental marking. |
if (FLAG_trace_incremental_marking) { |
heap()->isolate()->PrintWithTimestamp("[IncrementalMarking] Running\n"); |