mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
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.
This commit is contained in:
committed by
Andreas Kling
parent
3796d417e0
commit
b3e9a4e603
Notes:
sideshowbarker
2024-07-18 01:33:03 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/b3e9a4e603c Pull-request: https://github.com/SerenityOS/serenity/pull/10745 Reviewed-by: https://github.com/PeterBindels-TomTom Reviewed-by: https://github.com/sin-ack ✅
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user