mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:48:11 +00:00
WebContent: Remove unnecessary client map
WebContent processes only serve a single client, so we don't need to keep a map of them.
This commit is contained in:
parent
314a687eeb
commit
6cb3092b42
3 changed files with 5 additions and 10 deletions
|
@ -29,13 +29,10 @@
|
|||
|
||||
namespace WebContent {
|
||||
|
||||
static HashMap<int, RefPtr<ClientConnection>> s_connections;
|
||||
|
||||
ClientConnection::ClientConnection(NonnullRefPtr<Core::LocalSocket> socket, int client_id)
|
||||
: IPC::ClientConnection<WebContentClientEndpoint, WebContentServerEndpoint>(*this, move(socket), client_id)
|
||||
ClientConnection::ClientConnection(NonnullRefPtr<Core::LocalSocket> socket)
|
||||
: IPC::ClientConnection<WebContentClientEndpoint, WebContentServerEndpoint>(*this, move(socket), 1)
|
||||
, m_page_host(PageHost::create(*this))
|
||||
{
|
||||
s_connections.set(client_id, *this);
|
||||
m_paint_flush_timer = Core::Timer::create_single_shot(0, [this] { flush_pending_paint_requests(); });
|
||||
}
|
||||
|
||||
|
@ -45,9 +42,7 @@ ClientConnection::~ClientConnection()
|
|||
|
||||
void ClientConnection::die()
|
||||
{
|
||||
s_connections.remove(client_id());
|
||||
if (s_connections.is_empty())
|
||||
Core::EventLoop::current().quit(0);
|
||||
Core::EventLoop::current().quit(0);
|
||||
}
|
||||
|
||||
Web::Page& ClientConnection::page()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue