Bug 265118
Summary: | NativePromise should allow void as reject type. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
Component: | Web Template Framework | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Jean-Yves Avenard [:jya]
NativePromise::Result is using `Expected<T, U>` as storage type ; which doesn't allow to have U==void
And as such, NativePromise must set a non-void type a RejectValueType.
In bug 264028, you can now chain promises of different types together, and if you chain a void promise, that promise gets resolve whenever the original promise gets resolved, regardless of the resolve value.
It would be nice to do the same for rejection. And as such, we need for NativePromise to handle RejectValueType == void.
This can be achieved by using Expected<T, NativePromise::VoidPlaceholder>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Jean-Yves Avenard [:jya]
<rdar://problem/117782213>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/20738
Jean-Yves Avenard [:jya]
rdar://118645560
EWS
Committed 270995@main (bb71e93437b5): <https://commits.webkit.org/270995@main>
Reviewed commits have been landed. Closing PR #20738 and removing active labels.