Bug 270320 - Simplify use of sendWithPromisedReplyOnDispatcher
Summary: Simplify use of sendWithPromisedReplyOnDispatcher
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on: 270282
Blocks:
  Show dependency treegraph
 
Reported: 2024-02-29 14:12 PST by Jean-Yves Avenard [:jya]
Modified: 2024-03-06 15:08 PST (History)
2 users (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] 2024-02-29 14:12:27 PST
When using sendWithPromisedReplyOnDispatcher you need to specify the WorkQueue twice like so:

`connection.sendWithPromisedReplyOnDispatcher(message, workqueue)->whenSettled(workqueue, [] { })`

the first SerialFunctionDispatcher is used to determined with the Message's IPC Decoder needs to run and the 2nd on where the callback will run.

The 1st SerialFunctionDispatcher should be able to be deducted from the second.

This can now be achieved easily following bug 270282.

and so you could write:
`connection.sendWithPromisedReply(message)->whenSettled(workqueue, [] { })`

The decoder would be automatically first dispatched when a completion handler is attached to the promise.
Comment 1 Radar WebKit Bug Importer 2024-02-29 14:12:54 PST
<rdar://problem/123857833>
Comment 2 Jean-Yves Avenard [:jya] 2024-02-29 21:54:53 PST
Pull request: https://github.com/WebKit/WebKit/pull/25335
Comment 3 EWS 2024-03-06 15:08:57 PST
Committed 275764@main (bb6155442858): <https://commits.webkit.org/275764@main>

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