Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index 838f9d0b6bf29c599fea927dda50c28c07ab295b..52d0ca4e51b6e297c04c94bfb686116722d32bba 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -50,8 +50,12 @@ IncrementalMarking::IncrementalMarking(Heap* heap) |
bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, Object* value) { |
HeapObject* value_heap_obj = HeapObject::cast(value); |
MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj); |
+ DCHECK(!Marking::IsImpossible(value_bit)); |
+ |
MarkBit obj_bit = Marking::MarkBitFrom(obj); |
+ DCHECK(!Marking::IsImpossible(obj_bit)); |
bool is_black = Marking::IsBlack(obj_bit); |
+ |
if (is_black && Marking::IsWhite(value_bit)) { |
WhiteToGreyAndPush(value_heap_obj, value_bit); |
RestartIfNotMarking(); |