Bug 265175 - invokeAsync should let you call method returning Expected<T, U>
Summary: invokeAsync should let you call method returning Expected<T, U>
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-20 21:54 PST by Jean-Yves Avenard [:jya]
Modified: 2023-11-21 04:44 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Yves Avenard [:jya] 2023-11-20 21:54:59 PST
mentioned in https://github.com/WebKit/WebKit/pull/20665

Right now, you have to create a new NativePromise<T, U> to return an Expected<T, U>

We could instead have a utility method doing Ref<NativePromise<T, U>> createSettledPromise(Expected<T, U>&&);

or have invokeAsync handle method returning an Expected, and automatically wrap a native promise around the result.
Comment 1 Radar WebKit Bug Importer 2023-11-20 21:55:18 PST
<rdar://problem/118671806>
Comment 2 Jean-Yves Avenard [:jya] 2023-11-20 21:59:54 PST
Pull request: https://github.com/WebKit/WebKit/pull/20770
Comment 3 EWS 2023-11-21 04:44:42 PST
Committed 271010@main (9d59d5e94815): <https://commits.webkit.org/271010@main>

Reviewed commits have been landed. Closing PR #20770 and removing active labels.