Everywhere: Make TransportSocket non-movable

Instead of wrapping all non-movable members of TransportSocket in OwnPtr
to keep it movable, make TransportSocket itself non-movable and wrap it
in OwnPtr.
This commit is contained in:
Aliaksandr Kalenik 2025-04-08 22:01:46 +02:00 committed by Alexander Kalenik
commit db8c443392
Notes: github-actions[bot] 2025-04-09 13:28:53 +00:00
42 changed files with 97 additions and 100 deletions

View file

@ -83,7 +83,7 @@ static ErrorOr<void> initialize_image_decoder(int image_decoder_socket)
auto socket = TRY(Core::LocalSocket::adopt_fd(image_decoder_socket));
TRY(socket->set_blocking(true));
auto new_client = TRY(try_make_ref_counted<ImageDecoderClient::Client>(IPC::Transport(move(socket))));
auto new_client = TRY(try_make_ref_counted<ImageDecoderClient::Client>(make<IPC::Transport>(move(socket))));
#ifdef AK_OS_WINDOWS
auto response = new_client->send_sync<Messages::ImageDecoderServer::InitTransport>(Core::System::getpid());
new_client->transport().set_peer_pid(response->peer_pid());
@ -101,7 +101,7 @@ static ErrorOr<void> initialize_resource_loader(GC::Heap& heap, int request_serv
auto socket = TRY(Core::LocalSocket::adopt_fd(request_server_socket));
TRY(socket->set_blocking(true));
auto request_client = TRY(try_make_ref_counted<Requests::RequestClient>(IPC::Transport(move(socket))));
auto request_client = TRY(try_make_ref_counted<Requests::RequestClient>(make<IPC::Transport>(move(socket))));
#ifdef AK_OS_WINDOWS
auto response = request_client->send_sync<Messages::RequestServer::InitTransport>(Core::System::getpid());
request_client->transport().set_peer_pid(response->peer_pid());