WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
265118
NativePromise should allow void as reject type.
https://bugs.webkit.org/show_bug.cgi?id=265118
Summary
NativePromise should allow void as reject type.
Jean-Yves Avenard [:jya]
Reported
2023-11-19 19:03:56 PST
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]
Comment 1
2023-11-20 03:06:33 PST
<
rdar://problem/117782213
>
Jean-Yves Avenard [:jya]
Comment 2
2023-11-20 03:07:09 PST
Pull request:
https://github.com/WebKit/WebKit/pull/20738
Jean-Yves Avenard [:jya]
Comment 3
2023-11-20 03:20:16 PST
rdar://118645560
EWS
Comment 4
2023-11-20 18:04:47 PST
Committed
270995@main
(bb71e93437b5): <
https://commits.webkit.org/270995@main
> Reviewed commits have been landed. Closing PR #20738 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug