mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:47:35 +00:00
LibIPC: Make Connection::send_sync return a NonnullOwnPtr
Since we VERIFY that we received a response, the response pointer is always non-null.
This commit is contained in:
parent
a2b34b7e6b
commit
28b8a2ec7a
1 changed files with 2 additions and 2 deletions
|
@ -118,12 +118,12 @@ public:
|
|||
}
|
||||
|
||||
template<typename RequestType, typename... Args>
|
||||
OwnPtr<typename RequestType::ResponseType> send_sync(Args&&... args)
|
||||
NonnullOwnPtr<typename RequestType::ResponseType> send_sync(Args&&... args)
|
||||
{
|
||||
post_message(RequestType(forward<Args>(args)...));
|
||||
auto response = wait_for_specific_endpoint_message<typename RequestType::ResponseType, PeerEndpoint>();
|
||||
VERIFY(response);
|
||||
return response;
|
||||
return response.release_nonnull();
|
||||
}
|
||||
|
||||
template<typename RequestType, typename... Args>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue