You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Table constructor uses ToValueType and ToWebAssemblyValue, which both assert that the type argument is not exnref, but the Table constructor itself does not check this:
The Table(descriptor, value) constructor, when invoked, performs the following steps:
Let elementType be ToValueType(descriptor["element"]).
Yeah I think that makes sense. I think we had discussions on why we wouldn't want to add exnref to ToWebAssemblyValue and ToJSValue, but I don't see why we shouldn't add it to ToValueType and separately check it. cc @dschuff
However, I would strongly suggest a refactoring here: Instead of having these checks duplicated in so many places, why not simply move them inside ToJSValue and ToWasmValue and throw there? Then they are in a canonical place, and there is no risk of forgetting them again in the presence of the next extension, be it new functions or new types.
The
Table
constructor usesToValueType
andToWebAssemblyValue
, which both assert that the type argument is notexnref
, but theTable
constructor itself does not check this:Should
ToValueType
acceptexnref
, and the second step be:?
The text was updated successfully, but these errors were encountered: