Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index e34dbfd2337cc0bec932e2729d51ae1aeb5d1787..61db9d88320171d1961818068ffc83b8512472e3 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -4504,12 +4504,10 @@ void SlotsBuffer::RemoveInvalidSlots(Heap* heap, SlotsBuffer* buffer) { |
ObjectSlot slot = slots[slot_idx]; |
if (!IsTypedSlot(slot)) { |
Object* object = *slot; |
- if (object->IsHeapObject()) { |
- if (heap->InNewSpace(object) || |
- !heap->mark_compact_collector()->IsSlotInLiveObject( |
- reinterpret_cast<Address>(slot))) { |
- slots[slot_idx] = kRemovedEntry; |
- } |
+ if ((object->IsHeapObject() && heap->InNewSpace(object)) || |
+ !heap->mark_compact_collector()->IsSlotInLiveObject( |
+ reinterpret_cast<Address>(slot))) { |
+ slots[slot_idx] = kRemovedEntry; |
} |
} else { |
++slot_idx; |