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

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

Issue 13998008: Add support for even more typed data on native ports (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « sdk/lib/io/common.dart ('k') | tests/standalone/io/file_typed_data_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 83952b17ee5a6e747c0fe877ca6cc8fa171cb272..d40840cb19b14682e299a9d4d067a760a4d7f2c3 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -813,7 +813,9 @@ class _RandomAccessFile extends _FileBase implements RandomAccessFile {
Future<RandomAccessFile> writeList(List<int> buffer, int offset, int bytes) {
_ensureFileService();
Completer<RandomAccessFile> completer = new Completer<RandomAccessFile>();
- if (buffer is !List || offset is !int || bytes is !int) {
+ if ((buffer is !List && buffer is !ByteData) ||
Anders Johnsen 2013/04/15 15:46:17 DBC: I believe this is wrong. We should not suppor
+ offset is !int ||
+ bytes is !int) {
// Complete asynchronously so the user has a chance to setup
// handlers without getting exceptions when registering the
// then handler.
« no previous file with comments | « sdk/lib/io/common.dart ('k') | tests/standalone/io/file_typed_data_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698