[heap] Do not clear second bit when iterating for grey objects on black pages.

BUG=chromium:561449
LOG=n

Review URL: https://codereview.chromium.org/1794383004

Cr-Commit-Position: refs/heads/master@{#34760}
This commit is contained in:
hpayer 2016-03-14 11:54:32 -07:00 committed by Commit bot
parent 27a9009a7c
commit 3617612f8b

View File

@ -182,8 +182,11 @@ HeapObject* LiveObjectIterator<T>::Next() {
} else if (T == kGreyObjectsOnBlackPage) {
object = HeapObject::FromAddress(addr);
}
// Clear the second bit of the found object.
current_cell_ &= ~second_bit_index;
if (T != kGreyObjectsOnBlackPage) {
// Clear the second bit of the found object.
current_cell_ &= ~second_bit_index;
}
// We found a live object.
if (object != nullptr) break;