Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index aa37d6011db022e4dca1154ba5f1fad21fc5bbed..e5c65705c9726b7245eb3361af4566df77e68c20 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -835,12 +835,13 @@ void IncrementalMarking::UpdateMarkingDequeAfterScavenge() { |
}); |
} |
+bool IncrementalMarking::IsFixedArrayWithProgressBar(HeapObject* obj) { |
+ if (!obj->IsFixedArray()) return false; |
+ MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
+ return chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR); |
+} |
void IncrementalMarking::VisitObject(Map* map, HeapObject* obj, int size) { |
- WhiteToGreyAndPush(map); |
- |
- IncrementalMarkingMarkingVisitor::IterateBody(map, obj); |
- |
#if ENABLE_SLOW_DCHECKS |
MarkBit mark_bit = ObjectMarking::MarkBitFrom(obj, marking_state(obj)); |
MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
@@ -848,7 +849,13 @@ void IncrementalMarking::VisitObject(Map* map, HeapObject* obj, int size) { |
(chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR) && |
Marking::IsBlack<kAtomicity>(mark_bit))); |
#endif |
- ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj)); |
+ if (ObjectMarking::GreyToBlack<kAtomicity>(obj, marking_state(obj))) { |
+ WhiteToGreyAndPush(map); |
+ IncrementalMarkingMarkingVisitor::IterateBody(map, obj); |
+ } else if (IsFixedArrayWithProgressBar(obj)) { |
+ DCHECK(ObjectMarking::IsBlack<kAtomicity>(obj, marking_state(obj))); |
+ IncrementalMarkingMarkingVisitor::VisitFixedArrayIncremental(map, obj); |
+ } |
} |
intptr_t IncrementalMarking::ProcessMarkingDeque( |