Commit 74c35110 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Fix bogus assert in HeapIterator.

BUG=397485
LOG=n
R=jarin@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6fda23d3
......@@ -3302,8 +3302,7 @@ bool Heap::CanMoveObjectStart(HeapObject* object) {
// for concurrent sweeping. The WasSwept predicate for concurrently swept
// pages is set after sweeping all pages.
return (!is_in_old_pointer_space && !is_in_old_data_space) ||
page->WasSwept() ||
(page->parallel_sweeping() <= MemoryChunk::SWEEPING_FINALIZE);
page->WasSwept() || page->SweepingCompleted();
}
......
......@@ -58,7 +58,7 @@ HeapObjectIterator::HeapObjectIterator(Page* page,
page->area_end(),
kOnePageOnly,
size_func);
ASSERT(page->WasSweptPrecisely());
ASSERT(page->WasSweptPrecisely() || page->SweepingCompleted());
}
......
......@@ -478,6 +478,8 @@ class MemoryChunk {
SWEEPING_PENDING;
}
bool SweepingCompleted() { return parallel_sweeping() <= SWEEPING_FINALIZE; }
// Manage live byte count (count of bytes known to be live,
// because they are marked black).
void ResetLiveBytes() {
......
......@@ -505,9 +505,9 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback,
}
}
} else {
if (page->parallel_sweeping() > MemoryChunk::SWEEPING_FINALIZE) {
if (!page->SweepingCompleted()) {
heap_->mark_compact_collector()->SweepInParallel(page, owner);
if (page->parallel_sweeping() > MemoryChunk::SWEEPING_FINALIZE) {
if (!page->SweepingCompleted()) {
// We were not able to sweep that page, i.e., a concurrent
// sweeper thread currently owns this page.
// TODO(hpayer): This may introduce a huge pause here. We
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment