Add emscripten_promise_await_unchecked API#26954
Merged
sbc100 merged 1 commit intoMay 15, 2026
Merged
Conversation
953780e to
97d16bd
Compare
Collaborator
Author
|
I'm not particularly attached to this name. We could also do with |
97d16bd to
23cfec2
Compare
tlively
approved these changes
May 14, 2026
Member
tlively
left a comment
There was a problem hiding this comment.
LGTM. I like the "unchecked" name.
23cfec2 to
2d979ec
Compare
This works with ASYNCIFY like the existing `emscripten_promise_await` but is a lot simpler since it only handles the fulfilled case. In this case we can simple return the result directly without needing to allocate a `em_promise_result_t` struct to deal with the out param (i.e. no memory access needed). This can be useful in cases where we don't want to handle the rejections case.
2d979ec to
fb3de64
Compare
sbc100
added a commit
that referenced
this pull request
May 15, 2026
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
May 15, 2026
This was broken by emscripten-core#26954 but not covered by CI because we run the `other` testsuite with the emsdk version of node that doesn't support wasm64.
sbc100
added a commit
that referenced
this pull request
May 15, 2026
This was broken by #26954 but not covered by CI because we run the `other` testsuite with the emsdk version of node that doesn't support wasm64. Without this change the wasm64 variant complains because it tried to case the return value of this function to a BigInt (pointer) before returning to Wasm.
sbc100
added a commit
that referenced
this pull request
May 15, 2026
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 works with ASYNCIFY like the existing
emscripten_promise_awaitbut is a lot simpler since it only handles the fulfilled case.In this case we can simple return the result directly without needing to allocate a
em_promise_result_tstruct to deal with the out param (i.e. no memory access needed).This can be useful in cases where we don't want to handle the rejections case.
Split out from #26947