Index: src/incremental-marking-inl.h |
diff --git a/src/incremental-marking-inl.h b/src/incremental-marking-inl.h |
index bbe9a9d209b36cca76360b2f9b091b755dc0587a..1e28e4a06b1cf1cf7ead93c810b17cf2134ebf4f 100644 |
--- a/src/incremental-marking-inl.h |
+++ b/src/incremental-marking-inl.h |
@@ -37,16 +37,23 @@ namespace internal { |
bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, |
Object** slot, |
Object* value) { |
- MarkBit value_bit = Marking::MarkBitFrom(HeapObject::cast(value)); |
+ HeapObject* value_heap_obj = HeapObject::cast(value); |
+ MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj); |
if (Marking::IsWhite(value_bit)) { |
MarkBit obj_bit = Marking::MarkBitFrom(obj); |
if (Marking::IsBlack(obj_bit)) { |
- BlackToGreyAndUnshift(obj, obj_bit); |
- RestartIfNotMarking(); |
+ MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); |
+ if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { |
+ WhiteToGreyAndPush(value_heap_obj, value_bit); |
+ RestartIfNotMarking(); |
+ } else { |
+ BlackToGreyAndUnshift(obj, obj_bit); |
+ RestartIfNotMarking(); |
+ return false; |
+ } |
+ } else { |
+ return false; |
} |
- |
- // Object is either grey or white. It will be scanned if survives. |
- return false; |
} |
if (!is_compacting_) return false; |
MarkBit obj_bit = Marking::MarkBitFrom(obj); |