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

Unified Diff: runtime/bin/file_impl.dart

Issue 9540009: Fix close callback on FileInputStreams. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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_impl.dart
diff --git a/runtime/bin/file_impl.dart b/runtime/bin/file_impl.dart
index e21fb88b68abbd84a37720bd8467c9750659bb61..d37ad893c94b15082f8636ad892c1b0ef89b61df 100644
--- a/runtime/bin/file_impl.dart
+++ b/runtime/bin/file_impl.dart
@@ -42,20 +42,22 @@ class _FileInputStream extends _BaseDataInputStream implements InputStream {
if (_clientErrorHandler != null) {
_clientErrorHandler();
}
- _streamMarkedClosed = true;
- _checkScheduleCallbacks();
} else {
_data = contents;
- _streamMarkedClosed = true;
- _checkScheduleCallbacks();
}
openedFile.close();
+ openedFile.closeHandler = () {
+ _streamMarkedClosed = true;
+ _checkScheduleCallbacks();
+ };
};
} else {
- _streamMarkedClosed = true;
- _checkScheduleCallbacks();
openedFile.close();
- }
+ openedFile.closeHandler = () {
+ _streamMarkedClosed = true;
+ _checkScheduleCallbacks();
+ };
+ };
};
}
« 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