0246c485e0
To make sure Dart values with typed data types like `Uint8List`, `List`, `String` etc. hold the right type of JS values, check types of JS references in boxing functions that return Dart typed data types. To reflect what the functions actually do, and for consistency with other functions, boxing factory names are changed from `fromJSArray` to `fromRef`. New boxing functions `fromRefUnchecked` added for the call sites that already know the reference type to be the right type, for example in `dartifyRaw`. These unchecked functions will also be used in CL 424021 where we replace some `dartifyRaw` calls with more precise "dartify" functions that only converts when the type is right. (`dartifyRaw` always boxes the argument regardless of the type) Issue: https://github.com/dart-lang/sdk/issues/60357 Change-Id: Icdfb49b9b235d35af2af0c4be51b295ee68d99fc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429362 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Ömer Ağacan <omersa@google.com>