Bug 265175

Summary: invokeAsync should let you call method returning Expected<T, U>
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: Web Template FrameworkAssignee: 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   

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.