-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-js-interopIssues that impact all js interopIssues that impact all js interop
Description
On dart2wasm, when toJS
is called, we check if the typed list was a wrapper. If so, we call toJSArrayExternRef
:
@patch |
WasmExternRef jsFloat32ArrayFromDartFloat32List(Float32List l) { |
However, toJSArrayExternRef
creates a new typed array using the existing buffer:
@override |
This then leads to equality check failures between a
and a.toDart.toJS
. For that reason and consistency with how we handle List
/JSArray
conversions, we should return the original typed array. This also makes the a.toDart.toJS
consistent with the JS compilers.
Metadata
Metadata
Assignees
Labels
area-dart2wasmIssues for the dart2wasm compiler.Issues for the dart2wasm compiler.area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-js-interopIssues that impact all js interopIssues that impact all js interop