Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: src/heap/mark-compact-inl.h

Issue 2857003002: [heap] Fix live object iterator bail out case. (Closed)
Patch Set: change checks Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cb280e2bbb0dc9a179c29d59511fddc0b5610044 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.
- 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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698