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) { ...@@ -3302,8 +3302,7 @@ bool Heap::CanMoveObjectStart(HeapObject* object) {
// for concurrent sweeping. The WasSwept predicate for concurrently swept // for concurrent sweeping. The WasSwept predicate for concurrently swept
// pages is set after sweeping all pages. // pages is set after sweeping all pages.
return (!is_in_old_pointer_space && !is_in_old_data_space) || return (!is_in_old_pointer_space && !is_in_old_data_space) ||
page->WasSwept() || page->WasSwept() || page->SweepingCompleted();
(page->parallel_sweeping() <= MemoryChunk::SWEEPING_FINALIZE);
} }
......
...@@ -58,7 +58,7 @@ HeapObjectIterator::HeapObjectIterator(Page* page, ...@@ -58,7 +58,7 @@ HeapObjectIterator::HeapObjectIterator(Page* page,
page->area_end(), page->area_end(),
kOnePageOnly, kOnePageOnly,
size_func); size_func);
ASSERT(page->WasSweptPrecisely()); ASSERT(page->WasSweptPrecisely() || page->SweepingCompleted());
} }
......
...@@ -478,6 +478,8 @@ class MemoryChunk { ...@@ -478,6 +478,8 @@ class MemoryChunk {
SWEEPING_PENDING; SWEEPING_PENDING;
} }
bool SweepingCompleted() { return parallel_sweeping() <= SWEEPING_FINALIZE; }
// Manage live byte count (count of bytes known to be live, // Manage live byte count (count of bytes known to be live,
// because they are marked black). // because they are marked black).
void ResetLiveBytes() { void ResetLiveBytes() {
......
...@@ -505,9 +505,9 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback, ...@@ -505,9 +505,9 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback,
} }
} }
} else { } else {
if (page->parallel_sweeping() > MemoryChunk::SWEEPING_FINALIZE) { if (!page->SweepingCompleted()) {
heap_->mark_compact_collector()->SweepInParallel(page, owner); 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 // We were not able to sweep that page, i.e., a concurrent
// sweeper thread currently owns this page. // sweeper thread currently owns this page.
// TODO(hpayer): This may introduce a huge pause here. We // 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