Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index 55c436ad034d0190c97334565f8519d06bd8880d..fb992035d27d509583377477b25f7cb44354c09a 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -1950,7 +1950,8 @@ DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list, |
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.IsInt8Array() || obj.IsExternalInt8Array()) { |
const ByteArray& byte_array = ByteArray::Cast(obj); |
if (Utils::RangeCheck(offset, length, byte_array.Length())) { |
ByteArray::Copy(native_array, byte_array, offset, length); |