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

Unified Diff: runtime/bin/file_patch.dart

Issue 1006683002: Avoid race in _FileSystemWatcher if subscription closed while event queued. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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_patch.dart
diff --git a/runtime/bin/file_patch.dart b/runtime/bin/file_patch.dart
index 14499af5182ed9afa940d6d1f35bef278f75870e..479bb9f26c87bade20c6397dcffdc33a6e478a34 100644
--- a/runtime/bin/file_patch.dart
+++ b/runtime/bin/file_patch.dart
@@ -193,6 +193,10 @@ patch class _FileSystemWatcher {
if (event == null) continue;
eventCount++;
int pathId = event[4];
+ if (!_idMap.containsKey(pathId)) {
Søren Gjesse 2015/03/13 12:18:00 I am not sure this is 100% safe, but I have not sc
+ // Path is no longer being wathed.
+ continue;
+ }
bool isDir = getIsDir(event);
var path = getPath(event);
if ((event[0] & FileSystemEvent.CREATE) != 0) {
« 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