Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1429)

Unified Diff: runtime/vm/thread_test.cc

Issue 1292353004: Safepointing in GC (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove obsolete TODO. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« runtime/vm/scavenger.cc ('K') | « runtime/vm/scavenger.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
}
}
}
« runtime/vm/scavenger.cc ('K') | « runtime/vm/scavenger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698