Ladybird+Userland: Remove use of unnecessary fd passing socket concept

Now that LibIPC is using SCM_RIGHTS properly, we can go back to only
having one socket laying around when needing to transfer fds to peers.
This commit is contained in:
Andrew Kaster 2024-04-17 18:44:39 -06:00 committed by Tim Flynn
commit 5e1d678bae
Notes: sideshowbarker 2024-07-16 23:38:54 +09:00
32 changed files with 61 additions and 236 deletions

View file

@ -19,12 +19,9 @@ WebWorkerClient::WebWorkerClient(NonnullOwnPtr<Core::LocalSocket> socket)
{
}
WebView::SocketPair WebWorkerClient::dup_sockets()
IPC::File WebWorkerClient::dup_socket()
{
WebView::SocketPair pair;
pair.socket = MUST(IPC::File::clone_fd(socket().fd().value()));
pair.fd_passing_socket = MUST(IPC::File::clone_fd(fd_passing_socket().fd().value()));
return pair;
return MUST(IPC::File::clone_fd(socket().fd().value()));
}
}

View file

@ -10,7 +10,6 @@
#include <LibIPC/ConnectionToServer.h>
#include <LibWeb/Worker/WebWorkerClientEndpoint.h>
#include <LibWeb/Worker/WebWorkerServerEndpoint.h>
#include <LibWebView/SocketPair.h>
namespace Web::HTML {
@ -22,7 +21,7 @@ class WebWorkerClient final
public:
explicit WebWorkerClient(NonnullOwnPtr<Core::LocalSocket>);
WebView::SocketPair dup_sockets();
IPC::File dup_socket();
private:
virtual void die() override;