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

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: More git cleanup. 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
« no previous file with comments | « 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 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;
+ }
}
}
}
« no previous file with comments | « runtime/vm/scavenger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698