Index: src/store-buffer.cc |
diff --git a/src/store-buffer.cc b/src/store-buffer.cc |
index 7ee4fa2d4000ed4529476a427505194d579e443a..a7575ae32822344c7c626e81daa9a122a4e614f4 100644 |
--- a/src/store-buffer.cc |
+++ b/src/store-buffer.cc |
@@ -519,25 +519,22 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback, |
FindPointersToNewSpaceInRegion(start, end, slot_callback, clear_maps); |
} else { |
Page* page = reinterpret_cast<Page*>(chunk); |
- PagedSpace* owner = reinterpret_cast<PagedSpace*>(page->owner()); |
- Address start = page->area_start(); |
- Address end = page->area_end(); |
- if (owner == heap_->map_space()) { |
- ASSERT(page->WasSweptPrecisely()); |
- HeapObjectIterator iterator(page, NULL); |
- for (HeapObject* heap_object = iterator.Next(); heap_object != NULL; |
- heap_object = iterator.Next()) { |
- // We skip free space objects. |
- if (!heap_object->IsFiller()) { |
- FindPointersToNewSpaceInRegion( |
- heap_object->address() + HeapObject::kHeaderSize, |
- heap_object->address() + heap_object->Size(), slot_callback, |
- clear_maps); |
- } |
+ ASSERT(page->owner() == heap_->map_space() || |
+ page->owner() == heap_->old_pointer_space()); |
+ CHECK(page->WasSweptPrecisely()); |
+ |
+ HeapObjectIterator iterator(page, NULL); |
+ for (HeapObject* heap_object = iterator.Next(); |
+ heap_object != NULL; |
+ heap_object = iterator.Next()) { |
+ // We iterate over objects that contain pointers only. |
+ if (heap_object->ContainsPointers()) { |
+ FindPointersToNewSpaceInRegion( |
+ heap_object->address() + HeapObject::kHeaderSize, |
+ heap_object->address() + heap_object->Size(), |
+ slot_callback, |
+ clear_maps); |
} |
- } else { |
- FindPointersToNewSpaceInRegion( |
- start, end, slot_callback, clear_maps); |
} |
} |
} |