WebContent: Allow creating a WebDriverConnection with an existing socket

The socket used by WebDriverConnection will be created separately for
Ladybird.
This commit is contained in:
Timothy Flynn 2022-11-14 10:42:45 -05:00 committed by Tim Flynn
commit d2b2d3ad80
Notes: sideshowbarker 2024-07-17 09:48:50 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -209,7 +209,7 @@ ErrorOr<NonnullRefPtr<WebDriverConnection>> 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<Core::Stream::LocalSocket> socket, ConnectionFromClient& web_content_client, PageHost& page_host)