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); |