Index: runtime/vm/dart_api_impl.cc |
=================================================================== |
--- runtime/vm/dart_api_impl.cc (revision 15794) |
+++ runtime/vm/dart_api_impl.cc (working copy) |
@@ -2010,6 +2010,7 @@ |
DARTSCOPE(isolate); |
const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(list)); |
if (obj.IsUint8Array() || obj.IsExternalUint8Array() || |
+ obj.IsUint8ClampedArray() || obj.IsExternalUint8ClampedArray() || |
obj.IsInt8Array() || obj.IsExternalInt8Array()) { |
const ByteArray& byte_array = ByteArray::Cast(obj); |
if (Utils::RangeCheck(offset, length, byte_array.Length())) { |
@@ -2095,7 +2096,8 @@ |
Isolate* isolate = Isolate::Current(); |
DARTSCOPE(isolate); |
const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(list)); |
- if (obj.IsUint8Array() || obj.IsExternalUint8Array()) { |
+ if (obj.IsUint8Array() || obj.IsExternalUint8Array() || |
+ obj.IsUint8ClampedArray() || obj.IsExternalUint8ClampedArray()) { |
const ByteArray& byte_array = ByteArray::Cast(obj); |
if (Utils::RangeCheck(offset, length, byte_array.Length())) { |
ByteArray::Copy(byte_array, offset, native_array, length); |