Skip to content

Handle rejection of promise when binary download fails #12407

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

Merged
merged 1 commit into from
Oct 2, 2020
Merged

Handle rejection of promise when binary download fails #12407

merged 1 commit into from
Oct 2, 2020

Conversation

stephanreiter
Copy link
Contributor

@stephanreiter stephanreiter commented Oct 2, 2020

Avoids an unhandled promise rejection error.

Fixes #12395

@welcome
Copy link

welcome bot commented Oct 2, 2020

Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS.

@stephanreiter stephanreiter changed the title Handle rejection of promise when binary download fails to fix #12395 Handle rejection of promise when binary download fails Oct 2, 2020
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

This will handle the rejection, making it not fail the whole application, but I think that's indeed what we want here. If we somehow fail, wasmOffsetConverter will be null, and if it's used later we'll see an error, plus it's logged. The other case in the other PR, of handling rejections for the main download, is trickier...

@kripken kripken merged commit 3fd1f0d into emscripten-core:master Oct 2, 2020
@stephanreiter stephanreiter deleted the issue12395 branch October 2, 2020 15:57
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

Successfully merging this pull request may close these issues.

Unhandled promise rejection if WASM binary cannot be downloaded and ASAN is on
2 participants