Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 5c724bf3ee8d48f6fde9fcc0f194df4d564e469c..ab4e72655c47e79d7660c14c5e1bdb619c4c2715 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1626,6 +1626,13 @@ void Heap::Scavenge() { |
scavenge_collector_->SelectScavengingVisitorsTable(); |
+ if (UsingEmbedderHeapTracer()) { |
+ // Register found wrappers with embedder so he can add them to his marking |
+ // deque and correctly manage the case when v8 scavenger collects the |
+ // wrappers by either keeping wrappables alive, or cleaning marking deque. |
+ mark_compact_collector()->RegisterWrappersWithEmbedderHeapTracer(); |
+ } |
+ |
array_buffer_tracker()->PrepareDiscoveryInNewSpace(); |
// Flip the semispaces. After flipping, to space is empty, from space has |