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

Unified Diff: sdk/lib/io/common.dart

Issue 11418004: Don't copy Int8Arrays when passing them in as lists of bytes and don't (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/common.dart
diff --git a/sdk/lib/io/common.dart b/sdk/lib/io/common.dart
index 687d2edf036bd6b84d31939a38c2aab8b76d6085..5a39a46652f771508b7c11b8688bf0d4c993d9dc 100644
--- a/sdk/lib/io/common.dart
+++ b/sdk/lib/io/common.dart
@@ -68,7 +68,9 @@ class _BufferAndOffset {
// benefit that it is faster to access from the C code as well.
_BufferAndOffset _ensureFastAndSerializableBuffer(
List buffer, int offset, int bytes) {
- if (buffer is Uint8List || _BufferUtils._isBuiltinList(buffer)) {
+ if (buffer is Uint8List ||
+ buffer is Int8List ||
+ _BufferUtils._isBuiltinList(buffer)) {
return new _BufferAndOffset(buffer, offset);
}
var newBuffer = new Uint8List(bytes);
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698