There are a small number of cases in the JS API cast code that makes too-optimistic assumptions for top types (because the code was originally written to implement cast instructions, which benefit from static type-checking). Example diff for js-api.js: ``` + { + let m1 = instantiate(` + (module + (func (export "f")) + ) + `); + assert.throws( + () => instantiate(` + (module + (global (import "m" "f") (ref any)) + ) + `, { m: { f: m1.exports.f } }), + WebAssembly.LinkError, + "Argument value did not match the reference type" + ) + } ``` There's a simple fix for these cases.
Pull request: https://github.com/WebKit/WebKit/pull/25599
<rdar://problem/124294503>
Committed 276580@main (a2bcc4921f7c): <https://commits.webkit.org/276580@main> Reviewed commits have been landed. Closing PR #25599 and removing active labels.