Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index d51b03f64f1537bc41a0d20ad16d417ef78727ed..6d93216cd452520017dbbed1557915c3c7ee7b1b 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -3464,8 +3464,9 @@ void MarkCompactCollector::EvacuatePagesInParallel() { |
void MarkCompactCollector::WaitUntilCompactionCompleted() { |
- while (concurrent_compaction_tasks_active_-- > 0) { |
+ while (concurrent_compaction_tasks_active_ > 0) { |
pending_compaction_tasks_semaphore_.Wait(); |
+ concurrent_compaction_tasks_active_--; |
} |
parallel_compaction_in_progress_ = false; |
} |