mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibCore: Childify children of CLocalServer and IPC::Connection
Inspecting a "TextEditor" process with Inspector now looks awesome. :^)
This commit is contained in:
parent
a1a4013b1c
commit
fc6bd52e0d
Notes:
sideshowbarker
2024-07-19 12:36:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fc6bd52e0da
2 changed files with 5 additions and 3 deletions
|
@ -31,7 +31,7 @@ bool CLocalServer::listen(const String& address)
|
|||
ASSERT(rc == 0);
|
||||
m_listening = true;
|
||||
|
||||
m_notifier = make<CNotifier>(m_fd, CNotifier::Event::Read);
|
||||
m_notifier = make<CNotifier>(m_fd, CNotifier::Event::Read, this);
|
||||
m_notifier->on_ready_to_read = [this] {
|
||||
if (on_ready_to_accept)
|
||||
on_ready_to_accept();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue