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

Unified Diff: sdk/lib/io/file_impl.dart

Issue 1145403004: Fix errors in previous commit (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/io/file_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/file_impl.dart
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index b84a078f134ded885392863e58362568ad6f44ce..a98d9482671625458ab35b7995bf7b0b9b3d5fb1 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -697,7 +697,7 @@ class _RandomAccessFile
throw new ArgumentError();
}
end = RangeError.checkValidRange(start, end, buffer.length);
- if (end == start) return 0;
+ if (end == start) return new Future.value(0);
int length = end - start;
return _dispatch(_FILE_READ_INTO, [_id, length]).then((response) {
if (_isErrorResponse(response)) {
@@ -770,7 +770,7 @@ class _RandomAccessFile
throw new ArgumentError("Invalid arguments to writeFrom");
}
end = RangeError.checkValidRange(start, end, buffer.length);
- if (end == start) return;
+ if (end == start) return new Future.value(this);
_BufferAndStart result;
try {
result = _ensureFastAndSerializableByteData(buffer, start, end);
« no previous file with comments | « no previous file | tests/standalone/io/file_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698