Index: src/store-buffer.cc |
diff --git a/src/store-buffer.cc b/src/store-buffer.cc |
index 3745d91a8a417071b8f40262069ebee34deed332..d1a04d292fb2cb0f79282972caa0b26c8d3b8c2f 100644 |
--- a/src/store-buffer.cc |
+++ b/src/store-buffer.cc |
@@ -505,6 +505,16 @@ void StoreBuffer::IteratePointersToNewSpace(ObjectSlotCallback slot_callback, |
} |
} |
} else { |
+ if (page->parallel_sweeping() > MemoryChunk::SWEEPING_FINALIZE) { |
+ heap_->mark_compact_collector()->SweepInParallel(page, owner); |
+ if (page->parallel_sweeping() > MemoryChunk::SWEEPING_FINALIZE) { |
+ // 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 |
+ // just care about finish sweeping of the scan on scavenge page. |
+ heap_->mark_compact_collector()->EnsureSweepingCompleted(); |
+ } |
+ } |
FindPointersToNewSpaceInRegion( |
start, end, slot_callback, clear_maps); |
} |