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

Unified Diff: pkg/http/lib/src/utils.dart

Issue 13138002: Change http code in pkg to use dart:typeddata instead of dart:scalarlist (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | « pkg/http/lib/src/response.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/utils.dart
===================================================================
--- pkg/http/lib/src/utils.dart (revision 20600)
+++ pkg/http/lib/src/utils.dart (working copy)
@@ -7,7 +7,7 @@
import 'dart:async';
import 'dart:crypto';
import 'dart:io';
-import 'dart:scalarlist';
+import 'dart:typeddata';
import 'dart:uri';
import 'dart:utf';
@@ -116,8 +116,7 @@
/// [ByteArrayViewable], this just returns a view on [input].
Uint8List toUint8List(List<int> input) {
if (input is Uint8List) return input;
- if (input is ByteArrayViewable) input = input.asByteArray();
- if (input is ByteArray) return new Uint8List.view(input);
+ if (input is ByteData) return new Uint8List.view(input.buffer);
var output = new Uint8List(input.length);
output.setRange(0, input.length, input);
return output;
« no previous file with comments | « pkg/http/lib/src/response.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698