1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

WebDriver: Fix handling of disconnected WebContent process

If WebContent process got disconnected it is only necessary to remove
associated window instead of terminating the entire session.
This commit is contained in:
Aliaksandr Kalenik 2023-03-19 14:08:52 +03:00 committed by Jelle Raaijmakers
parent 7146c33522
commit 16a4949e33
3 changed files with 13 additions and 11 deletions

View file

@ -9,17 +9,15 @@
namespace WebDriver {
WebContentConnection::WebContentConnection(NonnullOwnPtr<Core::LocalSocket> socket, NonnullRefPtr<Client> client, unsigned session_id)
WebContentConnection::WebContentConnection(NonnullOwnPtr<Core::LocalSocket> socket)
: IPC::ConnectionFromClient<WebDriverClientEndpoint, WebDriverServerEndpoint>(*this, move(socket), 1)
, m_client(move(client))
, m_session_id(session_id)
{
}
void WebContentConnection::die()
{
dbgln_if(WEBDRIVER_DEBUG, "Session {} was closed remotely. Shutting down...", m_session_id);
m_client->close_session(m_session_id);
if (on_close)
on_close();
}
}