Bug 264028

Summary: NativePromise should be chain able so long that their resolve/reject type can be converted into
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   
See Also: https://bugs.webkit.org/show_bug.cgi?id=265096

Description Jean-Yves Avenard [:jya] 2023-10-31 23:46:36 PDT
Right Now, you can only chain identical NativePromises.
`NativePromise::chainTo()` requires a NativePromise::Producer of the exact same type.

It would be nice if we could chain promises so long that their resolve/reject type are convertible into the other.

e.g. chain a NativePromise<void, int> to a NativePromise<void, long>
Comment 1 Radar WebKit Bug Importer 2023-10-31 23:46:53 PDT
<rdar://problem/117782213>
Comment 2 Jean-Yves Avenard [:jya] 2023-11-19 03:47:46 PST
Pull request: https://github.com/WebKit/WebKit/pull/20721
Comment 3 Jean-Yves Avenard [:jya] 2023-11-19 21:29:01 PST
*** Bug 265096 has been marked as a duplicate of this bug. ***
Comment 4 EWS 2023-11-20 16:26:24 PST
Committed 270990@main (f69deb1f63af): <https://commits.webkit.org/270990@main>

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