Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 147d5ddff02578e3fa82428f3672fac83a900712..c76f691f0d22369501cb5b177bd7519097126b04 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -1597,7 +1597,7 @@ void Heap::Scavenge() { |
incremental_marking()->UpdateMarkingDequeAfterScavenge(); |
ScavengeWeakObjectRetainer weak_object_retainer(this); |
- ProcessWeakReferences(&weak_object_retainer); |
+ ProcessYoungWeakReferences(&weak_object_retainer); |
DCHECK(new_space_front == new_space_.top()); |
@@ -1684,11 +1684,9 @@ void Heap::UpdateReferencesInExternalStringTable( |
} |
-void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) { |
+void Heap::ProcessAllWeakReferences(WeakObjectRetainer* retainer) { |
ProcessArrayBuffers(retainer); |
ProcessNativeContexts(retainer); |
- // TODO(mvstanton): AllocationSites only need to be processed during |
- // MARK_COMPACT, as they live in old space. Verify and address. |
ProcessAllocationSites(retainer); |
// Collects callback info for handles that are pending (about to be |
// collected) and either phantom or internal-fields. Releases the global |
@@ -1697,6 +1695,16 @@ void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) { |
} |
+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(); |
+} |
+ |
+ |
void Heap::ProcessNativeContexts(WeakObjectRetainer* retainer) { |
Object* head = VisitWeakList<Context>(this, native_contexts_list(), retainer); |
// Update the head of the list of contexts. |