Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index 0c0f5b408ee5ae573dcdc8f533e7ad9d3987f620..321d443caef7603b1cbad727a2e1ff7a34a457d2 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -1201,6 +1201,19 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes, |
if (state_ == MARKING) { |
bytes_processed = ProcessMarkingDeque(bytes_to_process); |
+ if (FLAG_incremental_marking_wrappers && |
+ heap_->UsingEmbedderHeapTracer()) { |
+ // This currently marks through all registered wrappers and does not |
+ // respect bytes_to_process. |
+ // TODO(hpayer): Integrate incremental marking of wrappers into |
+ // bytes_to_process logic. |
+ heap_->mark_compact_collector() |
+ ->RegisterWrappersWithEmbedderHeapTracer(); |
+ heap_->mark_compact_collector()->embedder_heap_tracer()->AdvanceTracing( |
+ 0, |
+ EmbedderHeapTracer::AdvanceTracingActions( |
+ EmbedderHeapTracer::ForceCompletionAction::FORCE_COMPLETION)); |
+ } |
if (heap_->mark_compact_collector()->marking_deque()->IsEmpty()) { |
if (completion == FORCE_COMPLETION || |
IsIdleMarkingDelayCounterLimitReached()) { |