Index: src/heap/mark-compact-inl.h |
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h |
index 2d2feb29e5b169828569497bf7213460da0e0ab3..b5f58462dad24bd1d1400ec7eafd366cd05e2ad8 100644 |
--- a/src/heap/mark-compact-inl.h |
+++ b/src/heap/mark-compact-inl.h |
@@ -24,7 +24,8 @@ void MarkCompactCollector::SetFlags(int flags) { |
void MarkCompactCollector::PushBlack(HeapObject* obj) { |
- if (marking_deque_.PushBlack(obj)) { |
+ DCHECK(Marking::IsBlack(Marking::MarkBitFrom(obj))); |
+ if (marking_deque_.Push(obj)) { |
MemoryChunk::IncrementLiveBytesFromGC(obj, obj->Size()); |
} else { |
Marking::BlackToGrey(obj); |
@@ -33,7 +34,8 @@ void MarkCompactCollector::PushBlack(HeapObject* obj) { |
void MarkCompactCollector::UnshiftBlack(HeapObject* obj) { |
- if (!marking_deque_.UnshiftBlack(obj)) { |
+ DCHECK(Marking::IsBlack(Marking::MarkBitFrom(obj))); |
+ if (!marking_deque_.Unshift(obj)) { |
MemoryChunk::IncrementLiveBytesFromGC(obj, -obj->Size()); |
Marking::BlackToGrey(obj); |
} |