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

Unified Diff: runtime/bin/socket_impl.dart

Issue 10379018: Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays."" (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
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index e4f11dbf25a061c5c967b5f8413336c9b7330b59..b52f3024ea5a0f14b2f6079bd9833a828686b4a1 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -411,10 +411,10 @@ class _Socket extends _SocketBase implements Socket {
// supplied List to a ByteArray if it isn't already.
List outBuffer;
int outOffset = offset;
- if (buffer is ByteArray || buffer is ObjectArray) {
+ if (buffer is Uint8List || buffer is ObjectArray) {
outBuffer = buffer;
} else {
- outBuffer = new ByteArray(bytes);
+ outBuffer = new Uint8List(bytes);
outOffset = 0;
int j = offset;
for (int i = 0; i < bytes; i++) {

Powered by Google App Engine
This is Rietveld 408576698