diff --git a/Userland/Services/WebContent/WebDriverConnection.cpp b/Userland/Services/WebContent/WebDriverConnection.cpp index f0f3f10dc3..0bfa776900 100644 --- a/Userland/Services/WebContent/WebDriverConnection.cpp +++ b/Userland/Services/WebContent/WebDriverConnection.cpp @@ -209,7 +209,7 @@ ErrorOr> WebDriverConnection::connect(Connect auto socket = TRY(Core::Stream::LocalSocket::connect(webdriver_ipc_path)); dbgln_if(WEBDRIVER_DEBUG, "Connected to WebDriver"); - return adopt_nonnull_ref_or_enomem(new (nothrow) WebDriverConnection(move(socket), web_content_client, page_host)); + return try_create(move(socket), web_content_client, page_host); } WebDriverConnection::WebDriverConnection(NonnullOwnPtr socket, ConnectionFromClient& web_content_client, PageHost& page_host) diff --git a/Userland/Services/WebContent/WebDriverConnection.h b/Userland/Services/WebContent/WebDriverConnection.h index 91893bf24c..dbea45c7bc 100644 --- a/Userland/Services/WebContent/WebDriverConnection.h +++ b/Userland/Services/WebContent/WebDriverConnection.h @@ -23,7 +23,7 @@ namespace WebContent { class WebDriverConnection final : public IPC::ConnectionToServer { - C_OBJECT_ABSTRACT(WebDriverConnection) + C_OBJECT(WebDriverConnection) public: static ErrorOr> connect(ConnectionFromClient& web_content_client, PageHost& page_host, String const& webdriver_ipc_path);