incremental_marking()->UpdateMarkingDequeAfterScavenge();
ScavengeWeakObjectRetainer weak_object_retainer(this);
- ProcessWeakReferences(&weak_object_retainer);
+ ProcessYoungWeakReferences(&weak_object_retainer);
DCHECK(new_space_front == new_space_.top());
}
-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
}
+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.
void UpdateReferencesInExternalStringTable(
ExternalStringTableUpdaterCallback updater_func);
- void ProcessWeakReferences(WeakObjectRetainer* retainer);
+ void ProcessAllWeakReferences(WeakObjectRetainer* retainer);
+ void ProcessYoungWeakReferences(WeakObjectRetainer* retainer);
void VisitExternalResources(v8::ExternalResourceVisitor* visitor);
// Process the weak references.
MarkCompactWeakObjectRetainer mark_compact_object_retainer;
- heap()->ProcessWeakReferences(&mark_compact_object_retainer);
+ heap()->ProcessAllWeakReferences(&mark_compact_object_retainer);
// Remove object groups after marking phase.
heap()->isolate()->global_handles()->RemoveObjectGroups();
&UpdateReferenceInExternalStringTableEntry);
EvacuationWeakObjectRetainer evacuation_object_retainer;
- heap()->ProcessWeakReferences(&evacuation_object_retainer);
+ heap()->ProcessAllWeakReferences(&evacuation_object_retainer);
// Visit invalidated code (we ignored all slots on it) and clear mark-bits
// under it.