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

Unified Diff: runtime/bin/http_parser.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/http_parser.dart
diff --git a/runtime/bin/http_parser.dart b/runtime/bin/http_parser.dart
index 66e0b427e24121e6bca61f84dea0fbd4f49e9511..c3f391a3e26c262c06ab185798041733896240a4 100644
--- a/runtime/bin/http_parser.dart
+++ b/runtime/bin/http_parser.dart
@@ -497,13 +497,13 @@ class _HttpParser {
case _State.BODY:
// The body is not handled one byte at a time but in blocks.
int dataAvailable = lastIndex - index;
- ByteArray data;
+ List<int> data;
if (_remainingContent == null ||
dataAvailable <= _remainingContent) {
- data = new ByteArray(dataAvailable);
+ data = new Uint8List(dataAvailable);
data.setRange(0, dataAvailable, buffer, index);
} else {
- data = new ByteArray(_remainingContent);
+ data = new Uint8List(_remainingContent);
data.setRange(0, _remainingContent, buffer, index);
}

Powered by Google App Engine
This is Rietveld 408576698