From 944e17ce9e220fd2a60d19eaea0e31155ea6e8c3 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 15 Dec 2022 08:44:10 -0500 Subject: [PATCH] WebContent: Disallow creating WebDriverConnections with existing sockets This reverts commit d2b2d3ad8062d2ce1612f24e4c45d533344a2be3. This is no longer needed once Ladybird will uses local socket files. --- Userland/Services/WebContent/WebDriverConnection.cpp | 2 +- Userland/Services/WebContent/WebDriverConnection.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index 7244fea996..e00aed4aa8 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -257,7 +257,7 @@ ErrorOr> WebDriverConnection::connect(Web::Pa auto socket = TRY(Core::Stream::LocalSocket::connect(webdriver_ipc_path)); dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver"); - return try_create(move(socket), page_client); + return adopt_nonnull_ref_or_enomem(new (nothrow) WebDriverConnection(move(socket), page_client)); } WebDriverConnection::WebDriverConnection(NonnullOwnPtr socket, Web::PageClient& page_client) diff --git a/Userland/Services/WebContent/WebDriverConnection.h b/Userland/Services/WebContent/WebDriverConnection.h index 16b965cd19..b3889697c9 100644 --- a/Userland/Services/WebContent/WebDriverConnection.h +++ b/Userland/Services/WebContent/WebDriverConnection.h @@ -26,7 +26,7 @@ namespace WebContent { class WebDriverConnection final : public IPC::ConnectionToServer { - C_OBJECT(WebDriverConnection) + C_OBJECT_ABSTRACT(WebDriverConnection) public: static ErrorOr> connect(Web::PageClient& page_client, DeprecatedString const& webdriver_ipc_path);