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

Unified Diff: runtime/bin/file_system_watcher_win.cc

Issue 25687003: IssueRead for DirectoryWatcherHandle as soon as the watcher starts. (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 | tests/standalone/io/file_system_watcher_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_system_watcher_win.cc
diff --git a/runtime/bin/file_system_watcher_win.cc b/runtime/bin/file_system_watcher_win.cc
index 014d861439615c59ee9cefad579ab9d91301b753..49af0e38fdb2bb14deea693bd3587f25e5ee3c21 100644
--- a/runtime/bin/file_system_watcher_win.cc
+++ b/runtime/bin/file_system_watcher_win.cc
@@ -49,8 +49,11 @@ intptr_t FileSystemWatcher::WatchPath(const char* path,
}
if (events & kModifyContent) list_events |= FILE_NOTIFY_CHANGE_LAST_WRITE;
- return reinterpret_cast<intptr_t>(
- new DirectoryWatchHandle(dir, list_events, recursive));
+ DirectoryWatchHandle* handle =
+ new DirectoryWatchHandle(dir, list_events, recursive);
+ handle->EnsureInitialized(EventHandler::delegate());
Søren Gjesse 2013/10/02 10:53:34 Please add a comment here on why this is done.
Anders Johnsen 2013/10/02 11:09:55 Done.
+ handle->IssueRead();
+ return reinterpret_cast<intptr_t>(handle);
}
« no previous file with comments | « no previous file | tests/standalone/io/file_system_watcher_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698