Closed tlively closed 9 months ago
Hm, I don't see it. Can you give an example of a case that would go wrong?
This algorithm does not care about types, it solely dispatches on the shape of values and it handles all shapes currently possible in Wasm. That dispatch is (and should be) completely agnostic to what types those values were viewed at on the Wasm side – types aren't needed here because there is nothing to check in the Wasm→JS direction.
Indeed, not sure what I was looking at last week. Sorry for the noise!
The
ToJSValue
algorithm in the JS spec looks like it is missing a case for converting subtypes of anyref to JS values. It should first convert them to externref, then use the existing logic for retrieving externref values.