Conversation
Avoiding the use of teh ? macro in performing PromiseResolve
Collaborator
Author
|
Just to confirm, this PR would close issue #56. |
syg
approved these changes
Jan 27, 2025
Contributor
syg
left a comment
There was a problem hiding this comment.
lgtm % SuspendError question.
document/js-api/index.bs
Outdated
| 1. Let |awaitResult| be the result of performing [$Completion$]([$Await$](|promise|)). | ||
| 1. Note: This will suspend both this algorithm, and the WebAssembly function being invoked by the [=evaluate a Promising function=] algorithm. On return, |ret| will be either a normal completion or a throw completion. | ||
| 1. If the entry for |async_context| in |map| is not [=paused=] then: | ||
| 1. Perform [=throw a JavaScript exception=] with a {{RuntimeError}}. |
Contributor
There was a problem hiding this comment.
This line changed from a SuspendError to RuntimeError. Was this intentional?
Collaborator
Author
There was a problem hiding this comment.
Oh no .. that's the result of github claiming a code conflict... I will fix.
Collaborator
Author
|
Spec now adjusted to reflect that calling Suspending imports will always suspend. |
Closed
SPY
added a commit
to SPY/js-promise-integration
that referenced
this pull request
Feb 5, 2025
WebAssembly#57 updated the spec. Updating tests to reflect the change.
SPY
added a commit
to SPY/wpt
that referenced
this pull request
Feb 5, 2025
…e value The JSPI proposal was updated recently to always suspend if suspending import was called by wrapping result with Promise.resolve WebAssembly/js-promise-integration#57
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Feb 20, 2025
Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Commit-Queue: Ilya Rezvov <irezvov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1422652}
aarongable
pushed a commit
to chromium/chromium
that referenced
this pull request
Feb 20, 2025
Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Commit-Queue: Ilya Rezvov <irezvov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1422652}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Feb 20, 2025
Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Commit-Queue: Ilya Rezvov <irezvov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1422652}
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Feb 28, 2025
…sts for JSPI, a=testonly Automatic update from web-platform-tests [wasm][jspi] Fix wpt and reenable WPT tests for JSPI Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Commit-Queue: Ilya Rezvov <irezvov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1422652} -- wpt-commits: 1ed7956f44f916907b3157e13cc5f5bf10b18c57 wpt-pr: 50839
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Mar 1, 2025
…sts for JSPI, a=testonly Automatic update from web-platform-tests [wasm][jspi] Fix wpt and reenable WPT tests for JSPI Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <sygchromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvanchromium.org> Commit-Queue: Ilya Rezvov <irezvovchromium.org> Cr-Commit-Position: refs/heads/main{#1422652} -- wpt-commits: 1ed7956f44f916907b3157e13cc5f5bf10b18c57 wpt-pr: 50839 UltraBlame original commit: 7b952e8c0041a350b0431969534d125b38f929a0
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Mar 1, 2025
…sts for JSPI, a=testonly Automatic update from web-platform-tests [wasm][jspi] Fix wpt and reenable WPT tests for JSPI Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <sygchromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvanchromium.org> Commit-Queue: Ilya Rezvov <irezvovchromium.org> Cr-Commit-Position: refs/heads/main{#1422652} -- wpt-commits: 1ed7956f44f916907b3157e13cc5f5bf10b18c57 wpt-pr: 50839 UltraBlame original commit: 7b952e8c0041a350b0431969534d125b38f929a0
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Mar 1, 2025
…sts for JSPI, a=testonly Automatic update from web-platform-tests [wasm][jspi] Fix wpt and reenable WPT tests for JSPI Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <sygchromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvanchromium.org> Commit-Queue: Ilya Rezvov <irezvovchromium.org> Cr-Commit-Position: refs/heads/main{#1422652} -- wpt-commits: 1ed7956f44f916907b3157e13cc5f5bf10b18c57 wpt-pr: 50839 UltraBlame original commit: 7b952e8c0041a350b0431969534d125b38f929a0
jamienicol
pushed a commit
to jamienicol/gecko
that referenced
this pull request
Mar 5, 2025
…sts for JSPI, a=testonly Automatic update from web-platform-tests [wasm][jspi] Fix wpt and reenable WPT tests for JSPI Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Commit-Queue: Ilya Rezvov <irezvov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1422652} -- wpt-commits: 1ed7956f44f916907b3157e13cc5f5bf10b18c57 wpt-pr: 50839
glandium
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
Apr 1, 2025
…sts for JSPI, a=testonly Automatic update from web-platform-tests [wasm][jspi] Fix wpt and reenable WPT tests for JSPI Update JSPI wpt test according to recent changes in spec landed in WebAssembly/js-promise-integration#57 Bug: 397449611 Change-Id: Iea277d945df24c00fce1565dae415ecb3e0092a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6282812 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Commit-Queue: Ilya Rezvov <irezvov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1422652} -- wpt-commits: 1ed7956f44f916907b3157e13cc5f5bf10b18c57 wpt-pr: 50839
|
It doesn't seem like the "compiled" version of the spec reflects these changes. See: https://webassembly.github.io/js-promise-integration/js-api/#create-a-suspending-function Does it need to be regenerated? |
Collaborator
Author
|
Yes, it does need to be regenerated... |
Collaborator
Author
|
done now |
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 modifies the specification:
All calls to functions that are marked as Suspending will be processed using Promise.resolve.
Note that, if the callee throws, then that throw is NOT converted to a Promise. In part, this is because we cannot reliably invoke Promise.reject in all cases (e.g., stack overflow errors).