Old space cannot be assumed to be iterable between GCs, even if swept precisely.

This is because allocation folding can cause uninitialized and hence uniterable fragments. Trying to inspect them causes SizeFromMap() crashes.

R=hpayer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2014-08-12 15:29:03 +00:00
parent d2fe3e68ea
commit 2c6d5cfb27

View File

@ -2009,16 +2009,11 @@ int MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(
static void DiscoverGreyObjectsInSpace(Heap* heap, MarkingDeque* marking_deque,
PagedSpace* space) {
if (space->swept_precisely()) {
HeapObjectIterator it(space);
DiscoverGreyObjectsWithIterator(heap, marking_deque, &it);
} else {
PageIterator it(space);
while (it.has_next()) {
Page* p = it.next();
DiscoverGreyObjectsOnPage(marking_deque, p);
if (marking_deque->IsFull()) return;
}
PageIterator it(space);
while (it.has_next()) {
Page* p = it.next();
DiscoverGreyObjectsOnPage(marking_deque, p);
if (marking_deque->IsFull()) return;
}
}