Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index c76f691f0d22369501cb5b177bd7519097126b04..10701c4bcc1b084bc91f3ad30e112faf2d4488f5 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1599,6 +1599,11 @@ void Heap::Scavenge() { |
ScavengeWeakObjectRetainer weak_object_retainer(this); |
ProcessYoungWeakReferences(&weak_object_retainer); |
+ // Collects callback info for handles referenced by young generation that are |
+ // pending (about to be collected) and either phantom or internal-fields. |
+ // Releases the global handles. See also PostGarbageCollectionProcessing. |
+ isolate()->global_handles()->CollectYoungPhantomCallbackData(); |
+ |
DCHECK(new_space_front == new_space_.top()); |
// Set age mark. |
@@ -1688,20 +1693,12 @@ void Heap::ProcessAllWeakReferences(WeakObjectRetainer* retainer) { |
ProcessArrayBuffers(retainer); |
ProcessNativeContexts(retainer); |
ProcessAllocationSites(retainer); |
- // Collects callback info for handles that are pending (about to be |
- // collected) and either phantom or internal-fields. Releases the global |
- // handles. See also PostGarbageCollectionProcessing. |
- isolate()->global_handles()->CollectPhantomCallbackData(); |
} |
void Heap::ProcessYoungWeakReferences(WeakObjectRetainer* retainer) { |
ProcessArrayBuffers(retainer); |
ProcessNativeContexts(retainer); |
- // Collects callback info for handles that are pending (about to be |
- // collected) and either phantom or internal-fields. Releases the global |
- // handles. See also PostGarbageCollectionProcessing. |
- isolate()->global_handles()->CollectPhantomCallbackData(); |
} |