From fc6bd52e0da7ed67bfae273eb2dddaa66018837a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 18 Aug 2019 12:14:43 +0200 Subject: [PATCH] LibCore: Childify children of CLocalServer and IPC::Connection Inspecting a "TextEditor" process with Inspector now looks awesome. :^) --- Libraries/LibCore/CLocalServer.cpp | 2 +- Libraries/LibCore/CoreIPCClient.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Libraries/LibCore/CLocalServer.cpp b/Libraries/LibCore/CLocalServer.cpp index 30abcc5f2b..ea9bc5135d 100644 --- a/Libraries/LibCore/CLocalServer.cpp +++ b/Libraries/LibCore/CLocalServer.cpp @@ -31,7 +31,7 @@ bool CLocalServer::listen(const String& address) ASSERT(rc == 0); m_listening = true; - m_notifier = make(m_fd, CNotifier::Event::Read); + m_notifier = make(m_fd, CNotifier::Event::Read, this); m_notifier->on_ready_to_read = [this] { if (on_ready_to_accept) on_ready_to_accept(); diff --git a/Libraries/LibCore/CoreIPCClient.h b/Libraries/LibCore/CoreIPCClient.h index f932014aca..36409d1265 100644 --- a/Libraries/LibCore/CoreIPCClient.h +++ b/Libraries/LibCore/CoreIPCClient.h @@ -50,7 +50,8 @@ namespace Client { C_OBJECT(Connection) public: Connection(const StringView& address) - : m_notifier(CNotifier(m_connection.fd(), CNotifier::Read)) + : m_connection(this) + , m_notifier(m_connection.fd(), CNotifier::Read, this) { // We want to rate-limit our clients m_connection.set_blocking(true); @@ -240,7 +241,8 @@ namespace Client { C_OBJECT(Connection) public: ConnectionNG(const StringView& address) - : m_notifier(CNotifier(m_connection.fd(), CNotifier::Read)) + : m_connection(this) + , m_notifier(m_connection.fd(), CNotifier::Read, this) { // We want to rate-limit our clients m_connection.set_blocking(true);