Index: src/incremental-marking.cc |
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc |
index f4ea1005796f301d1a71ece00e86b1032e5e3d99..b6bf0d36b131320fae6c1654ae4ae6ea4a72bf68 100644 |
--- a/src/incremental-marking.cc |
+++ b/src/incremental-marking.cc |
@@ -453,6 +453,16 @@ void IncrementalMarking::StartMarking() { |
MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); |
} |
+ if (is_compacting_) { |
+ // It's difficult to filter out slots recorded for large objects. |
+ LargeObjectIterator it(heap_->lo_space()); |
+ for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { |
+ if (obj->IsFixedArray() || obj->IsCode()) { |
+ Page::FromAddress(obj->address())->SetFlag(Page::RESCAN_ON_EVACUATION); |
+ } |
+ } |
+ } |
+ |
// Mark strong roots grey. |
IncrementalMarkingRootMarkingVisitor visitor(heap_, this); |
heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |