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

Unified Diff: runtime/bin/socket_stream_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_stream_impl.dart
diff --git a/runtime/bin/socket_stream_impl.dart b/runtime/bin/socket_stream_impl.dart
index 45c7e4d0e763aab00932557f986642d494efa6a6..f92754b0053a082c935d6fb7190c2698a133bac0 100644
--- a/runtime/bin/socket_stream_impl.dart
+++ b/runtime/bin/socket_stream_impl.dart
@@ -18,7 +18,7 @@ class _SocketInputStream implements SocketInputStream {
bytesToRead = len;
}
}
- ByteArray buffer = new ByteArray(bytesToRead);
+ List<int> buffer = new Uint8List(bytesToRead);
int bytesRead = _socket.readList(buffer, 0, bytesToRead);
if (bytesRead == 0) {
// On MacOS when reading from a tty Ctrl-D will result in one
@@ -27,7 +27,7 @@ class _SocketInputStream implements SocketInputStream {
// which is indicated by a null return value.
return null;
} else if (bytesRead < bytesToRead) {
- ByteArray newBuffer = new ByteArray(bytesRead);
+ List<int> newBuffer = new Uint8List(bytesRead);
newBuffer.setRange(0, bytesRead, buffer);
return newBuffer;
} else {

Powered by Google App Engine
This is Rietveld 408576698