Bug 261720
| Summary: | Give ability for IPC calls to work with NativePromise | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | WebKit Process Model | Assignee: | 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=257934 https://bugs.webkit.org/show_bug.cgi?id=261864 |
||
Jean-Yves Avenard [:jya]
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/115704438>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/17965
EWS
Committed 268240@main (f997a9edb80c): <https://commits.webkit.org/268240@main>
Reviewed commits have been landed. Closing PR #17965 and removing active labels.