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

Unified Diff: src/heap/heap.cc

Issue 885553005: Collect phantom callback data only once during gc. For scavenges, just consider the young handles r… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@weak-allocation-sites
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « src/global-handles.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « 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