Index: src/incremental-marking.cc |
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc |
index c32155e1430450875e653de2a68bf3411da21364..bb2c9ac2388b26a74f190fade21a364369acf276 100644 |
--- a/src/incremental-marking.cc |
+++ b/src/incremental-marking.cc |
@@ -886,6 +886,10 @@ void IncrementalMarking::Step(intptr_t allocated_bytes, |
} |
if (state_ == SWEEPING) { |
+ if (heap_->mark_compact_collector()->IsConcurrentSweepingInProgress() && |
+ heap_->mark_compact_collector()->IsSweepingCompleted()) { |
+ heap_->mark_compact_collector()->WaitUntilSweepingCompleted(); |
+ } |
if (!heap_->mark_compact_collector()->IsConcurrentSweepingInProgress()) { |
bytes_scanned_ = 0; |
StartMarking(PREVENT_COMPACTION); |