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

Unified Diff: src/heap/mark-compact.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/heap/heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index b5e8a1ec6b3996165314d5cc8ef01b444815ca13..fa366eefb6b6a2e5003aa1efe550bd74c4a7ca4f 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -309,8 +309,6 @@ void MarkCompactCollector::CollectGarbage() {
heap_->set_encountered_weak_cells(Smi::FromInt(0));
- isolate()->global_handles()->CollectPhantomCallbackData();
-
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
VerifyMarking(heap_);
@@ -3548,6 +3546,11 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
EvacuationWeakObjectRetainer evacuation_object_retainer;
heap()->ProcessAllWeakReferences(&evacuation_object_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()->CollectAllPhantomCallbackData();
+
// Visit invalidated code (we ignored all slots on it) and clear mark-bits
// under it.
ProcessInvalidatedCode(&updating_visitor);
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698