Skip to content

Commit

Permalink
Merged: [heap] Fix live object iterator bail out case.
Browse files Browse the repository at this point in the history
Revision: f82a59a

BUG=chromium:714207
LOG=N
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
R=mlippautz@chromium.org

Change-Id: Iae7b7032e1d72fe9574a61dc632d3411e1289109
Reviewed-on: https://chromium-review.googlesource.com/506072
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/branch-heads/5.9@{crosswalk-project#49}
Cr-Branched-From: fe9bb7e-refs/heads/5.9.211@{crosswalk-project#1}
Cr-Branched-From: 70ad237-refs/heads/master@{#44591}
  • Loading branch information
hannespayer committed May 15, 2017
1 parent ac29568 commit ad4b7a1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/heap/mark-compact-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,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();
}
Expand Down Expand Up @@ -223,7 +220,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();
}
Expand Down

0 comments on commit ad4b7a1

Please sign in to comment.