Index: runtime/vm/thread_test.cc |
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc |
index 5f8628b7fa96ae3fdc6e3ad2e01c624afe2ff53a..560aa1cb03734b77a9ffbca8c8ef3fae29e82371 100644 |
--- a/runtime/vm/thread_test.cc |
+++ b/runtime/vm/thread_test.cc |
@@ -498,12 +498,12 @@ TEST_CASE(HelperAllocAndGC) { |
Thread::PrepareForGC(); |
Dart::thread_pool()->Run(new AllocAndGCTask(isolate, &done_monitor, &done)); |
{ |
- // Manually wait. |
- // TODO(koda): Replace with execution of Dart and/or VM code when GC |
- // actually safepoints everything. |
- MonitorLocker ml(&done_monitor); |
- while (!done) { |
- ml.Wait(); |
+ while (true) { |
+ isolate->thread_registry()->CheckSafepoint(); |
+ MonitorLocker ml(&done_monitor); |
+ if (done) { |
+ break; |
+ } |
} |
} |
} |