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

Unified Diff: runtime/bin/file_impl.dart

Issue 10265023: Fix type assertion error in dart:io File library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 08ab62b002844086be277f32404b70fa7a5c44b0..8db0f5a26b2c5f43b5b4440812b858afd5567917 100644
--- a/runtime/bin/file_impl.dart
+++ b/runtime/bin/file_impl.dart
@@ -4,21 +4,21 @@
class _FileInputStream extends _BaseDataInputStream implements InputStream {
_FileInputStream(String name) {
- _file = new File(name);
+ var file = new File(name);
_data = [];
_position = 0;
- _file.onError = _reportError;
- _file.open(FileMode.READ, (openedFile) {
+ file.onError = _reportError;
+ file.open(FileMode.READ, (openedFile) {
_readDataFromFile(openedFile);
});
}
_FileInputStream.fromStdio(int fd) {
assert(fd == 0);
- _file = _File._openStdioSync(fd);
+ var file = _File._openStdioSync(fd);
_data = [];
_position = 0;
- _readDataFromFile(_file);
+ _readDataFromFile(file);
}
void _readDataFromFile(RandomAccessFile openedFile) {
@@ -75,7 +75,6 @@ class _FileInputStream extends _BaseDataInputStream implements InputStream {
_closed = true;
}
- File _file;
List<int> _data;
int _position;
bool _closed = false;
« 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