File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 2.10.4 - 2020-11-12
2+
3+ This is a patch release that fixes a crash in the Dart VM (issues [ #43941 ] [ ] ,
4+ [ flutter/flutter #43620 ] [ ] , and [ Dart-Code/Dart-Code #2814 ] [ ] ).
5+
6+ [ #43941 ] : https://github.com/dart-lang/sdk/issues/43941
7+ [ flutter/flutter#43620 ] : https://github.com/flutter/flutter/issues/43620
8+ [ Dart-Code/Dart-Code#2814 ] : https://github.com/Dart-Code/Dart-Code/issues/2814
9+
110## 2.10.3 - 2020-10-29
211
312This is a patch release that fixes the following issues:
Original file line number Diff line number Diff line change @@ -174,9 +174,17 @@ abstract class _FileSystemWatcher {
174174 assert (watcherPath.count > 0 );
175175 watcherPath.count-- ;
176176 if (watcherPath.count == 0 ) {
177- _unwatchPath (_id! , watcherPath.pathId);
178- _pathWatchedEnd ();
179- _idMap.remove (watcherPath.pathId);
177+ var pathId = watcherPath.pathId;
178+ // DirectoryWatchHandle(aka pathId) might be closed already initiated
179+ // by issueReadEvent for example. When that happens, appropriate closeEvent
180+ // will arrive to us and we will remove this pathId from _idMap. If that
181+ // happens we should not try to close it again as pathId is no
182+ // longer usable(the memory it points to might be released)
183+ if (_idMap.containsKey (pathId)) {
184+ _unwatchPath (_id! , pathId);
185+ _pathWatchedEnd ();
186+ _idMap.remove (pathId);
187+ }
180188 }
181189 _watcherPath = null ;
182190 }
Original file line number Diff line number Diff line change 2626CHANNEL stable
2727MAJOR 2
2828MINOR 10
29- PATCH 3
29+ PATCH 4
3030PRERELEASE 0
3131PRERELEASE_PATCH 0
You can’t perform that action at this time.
0 commit comments