spec icon indicating copy to clipboard operation
spec copied to clipboard

[js-api] Fix up missing preconditions on allocations

Open bvisness opened this issue 1 year ago • 0 comments

Adds explicit steps to run memtype and tabletype validation and throw a RangeError on failure. This explicitly satisfies the preconditions from the wasm embedding spec, and removes the need for the initial <= maximum check in the JS API spec.

One other small note: allocation failures on tables are now explicitly reported. This captures implementation limits on table length, which also weren't quite handled by the spec. (This removes a TODO referencing #584.)

Fixes #1792.

bvisness avatar Aug 27 '24 20:08 bvisness