Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Unified Diff: src/heap/heap.cc

Issue 753553002: Phantom references support internal fields (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Delete allocated objects in test to make memory sanitizer happy Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 2e90174ba019021814d2b576e4b1be4e35cde7c4..8f50ca89cb91325ee8d13024b844ccee7657edcd 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1560,9 +1560,10 @@ void Heap::Scavenge() {
isolate()->global_handles()->RemoveObjectGroups();
isolate()->global_handles()->RemoveImplicitRefGroups();
- isolate_->global_handles()->IdentifyNewSpaceWeakIndependentHandles(
+ isolate()->global_handles()->IdentifyNewSpaceWeakIndependentHandles(
&IsUnscavengedHeapObject);
- isolate_->global_handles()->IterateNewSpaceWeakIndependentRoots(
+
+ isolate()->global_handles()->IterateNewSpaceWeakIndependentRoots(
&scavenge_visitor);
new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
@@ -1667,6 +1668,10 @@ void Heap::ProcessWeakReferences(WeakObjectRetainer* 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
+ // handles. See also PostGarbageCollectionProcessing.
+ isolate()->global_handles()->CollectPhantomCallbackData();
}
« include/v8.h ('K') | « src/global-handles.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698