Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jsapi] Inconsistency with custom section decoding #914

Closed
xtuc opened this issue Nov 20, 2018 · 2 comments
Closed

[jsapi] Inconsistency with custom section decoding #914

xtuc opened this issue Nov 20, 2018 · 2 comments

Comments

@xtuc
Copy link
Contributor

xtuc commented Nov 20, 2018

This isn't really an issue, just seems inconsistent with the Module decoding semantics.

The JS spec specifies that WebAssembly.Module.customSections throws when a decoding error has been encountered in the name, see https://webassembly.github.io/spec/js-api/index.html#dom-module-customsections.

I had in mind that failing to decode a custom section should be ignored.

However, this API is used to search for a specific section.

@xtuc
Copy link
Contributor Author

xtuc commented Nov 20, 2018

After thinking more about that, I guess it's fine and it's consistent with other JS APIs, closing for now.

@xtuc xtuc closed this as completed Nov 20, 2018
@littledan
Copy link
Collaborator

Yes, I agree that this shouldn't be changed. Note that the contents of the custom section are not verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants