Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index e3c637ac89bb347b892f1321639d30d86c0d79c5..980e4b3d373aeba23d242eec949edd1001a912b4 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -1417,9 +1417,8 @@ |
class MarkCompactWeakObjectRetainer : public WeakObjectRetainer { |
public: |
virtual Object* RetainAs(Object* object) { |
- MarkBit mark_bit = Marking::MarkBitFrom(HeapObject::cast(object)); |
- DCHECK(!Marking::IsGrey(mark_bit)); |
- if (Marking::IsBlack(mark_bit)) { |
+ if (Marking::IsBlackOrGrey( |
+ Marking::MarkBitFrom(HeapObject::cast(object)))) { |
return object; |
} else if (object->IsAllocationSite() && |
!(AllocationSite::cast(object)->IsZombie())) { |
@@ -2328,8 +2327,8 @@ |
// Follow back pointer, check whether we are dealing with a map transition |
// from a live map to a dead path and in case clear transitions of parent. |
- DCHECK(!Marking::IsGrey(Marking::MarkBitFrom(map))); |
- bool parent_is_alive = Marking::IsBlack(Marking::MarkBitFrom(parent)); |
+ DCHECK(!Marking::IsBlackOrGrey(Marking::MarkBitFrom(map))); |
+ bool parent_is_alive = Marking::IsBlackOrGrey(Marking::MarkBitFrom(parent)); |
if (parent_is_alive) { |
ClearMapTransitions(parent, map); |
} |
@@ -2339,8 +2338,7 @@ |
// Clear a possible back pointer in case the transition leads to a dead map. |
// Return true in case a back pointer has been cleared and false otherwise. |
bool MarkCompactCollector::ClearMapBackPointer(Map* target) { |
- DCHECK(!Marking::IsGrey(Marking::MarkBitFrom(target))); |
- if (Marking::IsBlack(Marking::MarkBitFrom(target))) return false; |
+ if (Marking::IsBlackOrGrey(Marking::MarkBitFrom(target))) return false; |
target->SetBackPointer(heap_->undefined_value(), SKIP_WRITE_BARRIER); |
return true; |
} |