Chromium Code Reviews| Index: src/heap/mark-compact.cc |
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
| index 44262e42b162b58974cf7b2092ea141047856d2a..aacae732e06d0ce127dc9d77539aa13e9ce032ad 100644 |
| --- a/src/heap/mark-compact.cc |
| +++ b/src/heap/mark-compact.cc |
| @@ -2211,11 +2211,18 @@ 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); |
| MarkImplicitRefGroups(); |
| + DCHECK(marking_deque_.overflowed()); |
|
Hannes Payer (out of office)
2015/03/10 13:09:28
Why do we check here for overflowed?
|
| + |
| // Remove object groups after marking phase. |
| heap()->isolate()->global_handles()->RemoveObjectGroups(); |
| heap()->isolate()->global_handles()->RemoveImplicitRefGroups(); |