Commit f82a59ac authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Fix live object iterator bail out case.

BUG=chromium:714207

Review-Url: https://codereview.chromium.org/2857003002
Cr-Commit-Position: refs/heads/master@{#45055}
parent a525d7c1
......@@ -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.
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();
}
......@@ -245,7 +242,7 @@ HeapObject* LiveObjectIterator<T>::Next() {
}
if (current_cell_ == 0) {
if (!it_.Done() && it_.Advance()) {
if (it_.Advance()) {
cell_base_ = it_.CurrentCellBase();
current_cell_ = *it_.CurrentCell();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment