| Index: src/heap/mark-compact.cc
 | 
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
 | 
| index 63d41c08a0214df9c93dcb66c63a82097c4ad9e7..ae095782c380c1c5cb0109dba436e9374260be82 100644
 | 
| --- a/src/heap/mark-compact.cc
 | 
| +++ b/src/heap/mark-compact.cc
 | 
| @@ -540,6 +540,15 @@
 | 
|    });
 | 
|    late_pages_ = false;
 | 
|    sweeping_in_progress_ = false;
 | 
| +}
 | 
| +
 | 
| +void MarkCompactCollector::Sweeper::EnsureNewSpaceCompleted() {
 | 
| +  if (!sweeping_in_progress_) return;
 | 
| +  if (!FLAG_concurrent_sweeping || !IsSweepingCompleted()) {
 | 
| +    for (Page* p : *heap_->new_space()) {
 | 
| +      SweepOrWaitUntilSweepingCompleted(p);
 | 
| +    }
 | 
| +  }
 | 
|  }
 | 
|  
 | 
|  void MarkCompactCollector::EnsureSweepingCompleted() {
 | 
| 
 |