Clear up several issues around WebAssembly.Function usage#33
Open
tsyesika wants to merge 1 commit intoWebAssembly:mainfrom
Open
Clear up several issues around WebAssembly.Function usage#33tsyesika wants to merge 1 commit intoWebAssembly:mainfrom
tsyesika wants to merge 1 commit intoWebAssembly:mainfrom
Conversation
rossberg
reviewed
Jul 7, 2021
|
|
||
| * The constructor for this class can be used to explicitly construct Wasm exported functions, closing a gap in the current API in that does not provide a way for JavaScript to put a plain JS function into a table (while the same is possible from inside Wasm). | ||
|
|
||
| * The constructor should not allow for passing a `WebAssembly.Function` object in, in such situations a `TypeError` should be raised. |
Member
There was a problem hiding this comment.
I think throwing is not the right resolution here, see my latest comment on #13.
Contributor
|
cc @Ms2ger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This clears up two issues in the overview document surrounding the usage of
WebAssembly.Function, these are:WebAssembly.Functionobject to theWebAssembly.Functionconstructor. (discussed here: Passing a WasmExportedFunction to new WebAssembly.Function #13)ToJSValueshould be applied to arguments when called, etc.)