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

Side by Side Diff: runtime/bin/file_system_watcher_macos.cc

Issue 321133002: Don't use kFSEventStreamCreateFlagNoDefer as it messes with event flushing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/watcher/pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "bin/file_system_watcher.h" 8 #include "bin/file_system_watcher.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 context.info = reinterpret_cast<void*>(node); 106 context.info = reinterpret_cast<void*>(node);
107 CFArrayRef array = CFArrayCreate( 107 CFArrayRef array = CFArrayCreate(
108 NULL, reinterpret_cast<const void**>(&node->path_ref_), 1, NULL); 108 NULL, reinterpret_cast<const void**>(&node->path_ref_), 1, NULL);
109 FSEventStreamRef ref = FSEventStreamCreate( 109 FSEventStreamRef ref = FSEventStreamCreate(
110 NULL, 110 NULL,
111 Callback, 111 Callback,
112 &context, 112 &context,
113 array, 113 array,
114 kFSEventStreamEventIdSinceNow, 114 kFSEventStreamEventIdSinceNow,
115 0.10, 115 0.10,
116 kFSEventStreamCreateFlagNoDefer | kFSEventStreamCreateFlagFileEvents); 116 kFSEventStreamCreateFlagFileEvents);
117 CFRelease(array); 117 CFRelease(array);
118 118
119 node->set_ref(ref); 119 node->set_ref(ref);
120 120
121 FSEventStreamScheduleWithRunLoop( 121 FSEventStreamScheduleWithRunLoop(
122 node->ref_, 122 node->ref_,
123 node->watcher_->run_loop_, 123 node->watcher_->run_loop_,
124 kCFRunLoopDefaultMode); 124 kCFRunLoopDefaultMode);
125 125
126 FSEventStreamStart(node->ref_); 126 FSEventStreamStart(node->ref_);
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 return events; 389 return events;
390 } 390 }
391 391
392 } // namespace bin 392 } // namespace bin
393 } // namespace dart 393 } // namespace dart
394 394
395 #endif // defined(TARGET_OS_MACOS) 395 #endif // defined(TARGET_OS_MACOS)
396 396
397 397
OLDNEW
« no previous file with comments | « pkg/watcher/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698