Chromium Code Reviews| Index: runtime/vm/heap.cc |
| diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc |
| index 3353819575fe3c709a3d9ad7f1417bb524752f40..138e9b1e1902bb0e4d89fe983e6c3a46a6ac5d88 100644 |
| --- a/runtime/vm/heap.cc |
| +++ b/runtime/vm/heap.cc |
| @@ -224,7 +224,7 @@ HeapIterationScope::HeapIterationScope() |
| ASSERT(old_space_->iterating_thread_ != thread()); |
| #endif |
| while (old_space_->tasks() > 0) { |
| - ml.Wait(); |
| + ml.WaitWithSafepointCheck(thread()); |
| } |
| #if defined(DEBUG) |
| ASSERT(old_space_->iterating_thread_ == NULL); |