d2903a568c
Add a check both in the native implementation and on the Dart side (to avoid throwing uncatchable ApiError). Simplify native implementation: Dart_ListGetAsBytes has fast path for byte sized typed data lists, so there is no reason to inline the same fast path into the caller. Reported by Kyounghwan Kim (@drg2533) TEST=runtime/tests/vm/dart/regress_b508627933_test.dart Bug: b/508627933 Change-Id: I14c0f5270f143ed2386200241b13313f6a6a6964 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500461 Commit-Queue: Slava Egorov <vegorov@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>