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

Unified Diff: src/heap/mark-compact.cc

Issue 989173004: Before overapproximating the weak closure, make sure the marking deque is empty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 9 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 | « no previous file | 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 44262e42b162b58974cf7b2092ea141047856d2a..78da39f54c034f4a519048591d6a5daa7ba8ea4b 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2211,6 +2211,11 @@ void MarkCompactCollector::OverApproximateWeakClosure() {
GCTracer::Scope gc_scope(heap()->tracer(),
GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE);
+ // Make sure that the marking deque is empty, even if it has overflown.
+ // Otherwise, we might miss some objects in an object group that would
+ // otherwise made the entire group alive.
+ ProcessMarkingDeque();
+
RootMarkingVisitor root_visitor(heap());
isolate()->global_handles()->IterateObjectGroups(
&root_visitor, &IsUnmarkedHeapObjectWithHeap);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698