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

Unified Diff: runtime/bin/file_system_watcher_macos.cc

Issue 39713002: Use while(condition) around monitor wait, in file_system_watcher_macos. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_system_watcher_macos.cc
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index 6d51e9114baedf5771291eeb1ce933e2ab2193ab..1ae1810f65d2355a182c4dcfaacef4a5f9eeda18 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -136,7 +136,9 @@ class FSEventsWatcher {
if (watcher == NULL) {
watcher_monitor->Enter();
watcher = new FSEventsWatcher();
- watcher_monitor->Wait(Monitor::kNoTimeout);
+ while (watcher->run_loop_ == NULL) {
+ watcher_monitor->Wait(Monitor::kNoTimeout);
+ }
watcher_monitor->Exit();
}
watcher->users_++;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698