summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/EventLoop.cpp
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-31 23:38:04 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-02 22:56:53 +0100
commitb3e9a4e603ce6371e7c1a092bd70e5f367384c4b (patch)
tree680062ea1e2fddcd179edde5eee4bf7f6685eed2 /Userland/Libraries/LibCore/EventLoop.cpp
parent3796d417e00599c263c69ebf1ef4c0dcc52261a7 (diff)
downloadserenity-b3e9a4e603ce6371e7c1a092bd70e5f367384c4b.zip
Libraries: Fix visibility of Object-derivative constructors
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult.
Diffstat (limited to 'Userland/Libraries/LibCore/EventLoop.cpp')
-rw-r--r--Userland/Libraries/LibCore/EventLoop.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp
index d6a5a95ac6..1f99d51fef 100644
--- a/Userland/Libraries/LibCore/EventLoop.cpp
+++ b/Userland/Libraries/LibCore/EventLoop.cpp
@@ -125,7 +125,7 @@ pid_t EventLoop::s_pid;
class InspectorServerConnection : public Object {
C_OBJECT(InspectorServerConnection)
-public:
+private:
explicit InspectorServerConnection(RefPtr<LocalSocket> socket)
: m_socket(move(socket))
, m_client_id(s_id_allocator->allocate())
@@ -162,6 +162,7 @@ public:
inspected_object->decrement_inspector_count({});
}
+public:
void send_response(const JsonObject& response)
{
auto serialized = response.to_string();