Chromium Code Reviews| Index: src/heap/mark-compact-inl.h |
| diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h |
| index 6792f432a3707ea32c124d6b27b28f12fdf2ef37..402e3bf0af8571c1101cb48537fb814353634921 100644 |
| --- a/src/heap/mark-compact-inl.h |
| +++ b/src/heap/mark-compact-inl.h |
| @@ -174,16 +174,13 @@ HeapObject* LiveObjectIterator<T>::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. |
|
Michael Lippautz
2017/05/03 07:41:35
I have a troubles following the iterator and the s
|
| - if (it_.Done()) { |
| + if (it_.Done() || !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(); |
| } |