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

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

Issue 62443006: Fix an analyzer error in http and barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years, 1 month 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/barback/lib/src/utils.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
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart
index 64c50c4269e0c0e9c6a09701c0f1ec7465811625..457804cee8816ffb3242452ab6626a1b6843803a 100644
--- a/pkg/http/lib/src/utils.dart
+++ b/pkg/http/lib/src/utils.dart
@@ -112,7 +112,10 @@ bool isPlainAscii(String string) => _ASCII_ONLY.hasMatch(string);
/// If [input] is a [TypedData], this just returns a view on [input].
Uint8List toUint8List(List<int> input) {
if (input is Uint8List) return input;
- if (input is TypedData) return new Uint8List.view(input.buffer);
+ if (input is TypedData) {
+ // TODO(nweiz): remove "as" when issue 11080 is fixed.
+ return new Uint8List.view((input as TypedData).buffer);
+ }
return new Uint8List.fromList(input);
}
« no previous file with comments | « pkg/barback/lib/src/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698