Would give the ability to instead of doing: ``` m_connectionToWebProcess->connection().sendWithAsyncReply(Messages::MediaSourcePrivateRemote::WaitForTarget(target), WTFMove(completionHandler), m_identifier); ``` you could instead do: ``` m_connectionToWebProcess->connection().sendWithPromisedReply(Messages::MediaSourcePrivateRemote::WaitForTarget(target), m_identifier) ->whenSettled(runLoop, __func__, [] (MediaSourcePrivateRemote::WaitForTarget::Promise::Result&& result) { if (result) // do something with result.value() else // do something with result.error() }); ``` this would also gives the ability to propagate the IPC error, see bug 257934 It also allows to guarantee on which thread the completionHandler will run once the IPC operation has returned its value.
<rdar://problem/115704438>
Pull request: https://github.com/WebKit/WebKit/pull/17965
Committed 268240@main (f997a9edb80c): <https://commits.webkit.org/268240@main> Reviewed commits have been landed. Closing PR #17965 and removing active labels.