Skip to content

Commit 7c148d0

Browse files
committed
Version 2.10.4
* Cherry-pick da133e5 to stable * Cherry-pick ff1f611 to stable
2 parents ecf9ce8 + affff8b commit 7c148d0

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
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

312
This is a patch release that fixes the following issues:

sdk/lib/_internal/vm/bin/file_patch.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
CHANNEL stable
2727
MAJOR 2
2828
MINOR 10
29-
PATCH 3
29+
PATCH 4
3030
PRERELEASE 0
3131
PRERELEASE_PATCH 0

0 commit comments

Comments
 (0)