Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 5421dd20700f64108905bbb84536b130b4011218..63a50f3c065214182cea28d92b3f7c22b88bf802 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1610,8 +1610,6 @@ void Heap::Scavenge() { |
scavenge_collector_->SelectScavengingVisitorsTable(); |
- local_embedder_heap_tracer()->RegisterWrappersWithRemoteTracer(); |
- |
// Flip the semispaces. After flipping, to space is empty, from space has |
// live objects. |
new_space_->Flip(); |
@@ -1719,6 +1717,10 @@ void Heap::Scavenge() { |
IncrementYoungSurvivorsCounter(PromotedSpaceSizeOfObjects() + |
new_space_->Size() - survived_watermark); |
+ // Scavenger may find new wrappers by iterating objects promoted onto a black |
+ // page. |
+ local_embedder_heap_tracer()->RegisterWrappersWithRemoteTracer(); |
+ |
LOG(isolate_, ResourceEvent("scavenge", "end")); |
SetGCState(NOT_IN_GC); |