| Index: runtime/vm/thread_test.cc
|
| diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
|
| index e7f1fbdd03c0bb60ad5c68e83e0c3aa54b453370..940d50c3703366f120015fe604e62e5ea71c0a5d 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;
|
| + }
|
| }
|
| }
|
| }
|
|
|