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

Unified Diff: runtime/lib/byte_array.dart

Issue 10703118: Use native copy between internal/external bytearrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/byte_array.dart
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index 03265f8ca1da2f0e83297d879e3d8a8cf9a0bee6..2ef81e6dfe70951093de3a2dc940b29560cf4da9 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -1104,7 +1104,7 @@ class _Uint8Array extends _ByteArrayBase implements Uint8List {
}
void setRange(int start, int length, List<int> from, [int startFrom = 0]) {
- if (from is _Uint8Array) {
+ if (from is _Uint8Array || from is _ExternalUint8Array) {
_setRange(start * _BYTES_PER_ELEMENT,
length * _BYTES_PER_ELEMENT,
from,
@@ -1710,7 +1710,7 @@ class _ExternalUint8Array extends _ByteArrayBase implements Uint8List {
}
void setRange(int start, int length, List<int> from, [int startFrom = 0]) {
- if (from is _ExternalUint8Array) {
+ if (from is _ExternalUint8Array || from is _Uint8Array) {
_setRange(start * _BYTES_PER_ELEMENT,
length * _BYTES_PER_ELEMENT,
from,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698