diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h index 509b3947e34..cef381b1f84 100644 --- a/src/heap/mark-compact-inl.h +++ b/src/heap/mark-compact-inl.h @@ -152,16 +152,13 @@ HeapObject* LiveObjectIterator::Next() { // However, if there is a black area at the end of the page, and the // last word is a one word filler, we are not allowed to advance. In // that case we can return immediately. - if (it_.Done()) { + if (!it_.Advance()) { DCHECK(HeapObject::FromAddress(addr)->map() == HeapObject::FromAddress(addr) ->GetHeap() ->one_pointer_filler_map()); return nullptr; } - bool not_done = it_.Advance(); - USE(not_done); - DCHECK(not_done); cell_base_ = it_.CurrentCellBase(); current_cell_ = *it_.CurrentCell(); } @@ -223,7 +220,7 @@ HeapObject* LiveObjectIterator::Next() { } if (current_cell_ == 0) { - if (!it_.Done() && it_.Advance()) { + if (it_.Advance()) { cell_base_ = it_.CurrentCellBase(); current_cell_ = *it_.CurrentCell(); }