mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
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:
parent
79c22e0d86
commit
db8c443392
Notes:
github-actions[bot]
2025-04-09 13:28:53 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: db8c443392
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4287
42 changed files with 97 additions and 100 deletions
|
@ -22,7 +22,7 @@ class UIProcessClient final
|
|||
C_OBJECT(UIProcessClient);
|
||||
|
||||
private:
|
||||
explicit UIProcessClient(IPC::Transport);
|
||||
explicit UIProcessClient(NonnullOwnPtr<IPC::Transport>);
|
||||
};
|
||||
|
||||
ErrorOr<BrowserProcess::ProcessDisposition> BrowserProcess::connect(Vector<ByteString> const& raw_urls, NewWindow new_window)
|
||||
|
@ -49,7 +49,7 @@ ErrorOr<void> BrowserProcess::connect_as_client(ByteString const& socket_path, V
|
|||
{
|
||||
// TODO: Mach IPC
|
||||
auto socket = TRY(Core::LocalSocket::connect(socket_path));
|
||||
auto client = UIProcessClient::construct(IPC::Transport(move(socket)));
|
||||
auto client = UIProcessClient::construct(make<IPC::Transport>(move(socket)));
|
||||
|
||||
if (new_window == NewWindow::Yes) {
|
||||
if (!client->send_sync_but_allow_failure<Messages::UIProcessServer::CreateNewWindow>(raw_urls))
|
||||
|
@ -98,12 +98,12 @@ BrowserProcess::~BrowserProcess()
|
|||
MUST(Core::System::unlink(m_socket_path));
|
||||
}
|
||||
|
||||
UIProcessClient::UIProcessClient(IPC::Transport transport)
|
||||
UIProcessClient::UIProcessClient(NonnullOwnPtr<IPC::Transport> transport)
|
||||
: IPC::ConnectionToServer<UIProcessClientEndpoint, UIProcessServerEndpoint>(*this, move(transport))
|
||||
{
|
||||
}
|
||||
|
||||
UIProcessConnectionFromClient::UIProcessConnectionFromClient(IPC::Transport transport, int client_id)
|
||||
UIProcessConnectionFromClient::UIProcessConnectionFromClient(NonnullOwnPtr<IPC::Transport> transport, int client_id)
|
||||
: IPC::ConnectionFromClient<UIProcessClientEndpoint, UIProcessServerEndpoint>(*this, move(transport), client_id)
|
||||
{
|
||||
s_connections.set(client_id, *this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue