WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
270282
Add ability to settle a NativePromise with a function which will be run on the dispatcher given to then/whenSettled
https://bugs.webkit.org/show_bug.cgi?id=270282
Summary
Add ability to settle a NativePromise with a function which will be run on th...
Jean-Yves Avenard [:jya]
Reported
2024-02-28 21:16:23 PST
In
bug 270118
we added the possibility to specify the SerialFunctionDispatcher on which the IPC's Decoder was going to run on. But this is separated from the SerialFunctionDispatcher given to then/whenSettled and so you end up with a syntax call like: sendWithPromisedReplyOnDispatcher(message, workQueue())->whenSettled(workQueue(), [] { ... }); You need to set workQueue twice, it would be much more intuitive to simply do something like: sendWithPromisedReplyOnDispatcher(message)->whenSettled(workQueue(), [] { ... }); and the Connection would deliver the decoder directly to the promise. One of the issue here is that the time sendWithPromisedReplyOnDispatcher is called, no listener (created with whenSettled) would be attach yet. So no WorkQueue set. What we could have instead is a way to settle a promise with a pending CompletionHandler which would only be called once whenSettled/then is called, and would run that CompletionHandler on the target dispatcher rather than immediately.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-02-29 06:05:24 PST
<
rdar://problem/123830373
>
Jean-Yves Avenard [:jya]
Comment 2
2024-02-29 07:55:19 PST
Pull request:
https://github.com/WebKit/WebKit/pull/25295
EWS
Comment 3
2024-03-05 17:13:33 PST
Committed
275720@main
(e323dca2b77f): <
https://commits.webkit.org/275720@main
> Reviewed commits have been landed. Closing PR #25295 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