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

Unified Diff: runtime/bin/file_impl.dart

Issue 10543078: Fix dart:io File.openInputStream input stream to cancel outstanding onData events when EOF reached. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_impl.dart
diff --git a/runtime/bin/file_impl.dart b/runtime/bin/file_impl.dart
index d18552275210a156a983021c213e65860a86b44c..fd2c4cbe6ccebcb474f074726f46d56eaa9d2bd6 100644
--- a/runtime/bin/file_impl.dart
+++ b/runtime/bin/file_impl.dart
@@ -38,6 +38,7 @@ class _FileInputStream extends _BaseDataInputStream implements InputStream {
}
void _closeFile() {
+ if (available() == 0) _cancelScheduledDataCallback();
if (!_openedFile.closed) {
_openedFile.close().then((ignore) {
_streamMarkedClosed = true;
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698