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

Unified Diff: runtime/bin/file_system_watcher_macos.cc

Issue 23967004: Be sure to enter monitor before notifying, in file_system_watcher_macos. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove test from status-file. Created 7 years, 3 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 | tests/standalone/standalone.status » ('j') | 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 b694bfddfd174478dc3ae1f024cd434c65d04e57..de0be2eb9c552fa32aab3fbf8abe894895061709 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -114,7 +114,9 @@ class FSEventsWatcher {
watcher->run_loop_ = CFRunLoopGetCurrent();
// Notify, as the run-loop is set.
+ watcher_monitor->Enter();
watcher_monitor->Notify();
+ watcher_monitor->Exit();
CFRunLoopTimerRef timer = CFRunLoopTimerCreate(
NULL,
@@ -132,8 +134,8 @@ class FSEventsWatcher {
static void Increment() {
if (watcher == NULL) {
- watcher = new FSEventsWatcher();
watcher_monitor->Enter();
+ watcher = new FSEventsWatcher();
watcher_monitor->Wait(Monitor::kNoTimeout);
watcher_monitor->Exit();
}
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698