diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-10-31 23:38:04 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-02 22:56:53 +0100 |
commit | b3e9a4e603ce6371e7c1a092bd70e5f367384c4b (patch) | |
tree | 680062ea1e2fddcd179edde5eee4bf7f6685eed2 /Userland/Libraries/LibWebSocket/Impl | |
parent | 3796d417e00599c263c69ebf1ef4c0dcc52261a7 (diff) | |
download | serenity-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/LibWebSocket/Impl')
-rw-r--r-- | Userland/Libraries/LibWebSocket/Impl/TCPWebSocketConnectionImpl.h | 3 | ||||
-rw-r--r-- | Userland/Libraries/LibWebSocket/Impl/TLSv12WebSocketConnectionImpl.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWebSocket/Impl/TCPWebSocketConnectionImpl.h b/Userland/Libraries/LibWebSocket/Impl/TCPWebSocketConnectionImpl.h index 3c686e194c..1ece3f8bef 100644 --- a/Userland/Libraries/LibWebSocket/Impl/TCPWebSocketConnectionImpl.h +++ b/Userland/Libraries/LibWebSocket/Impl/TCPWebSocketConnectionImpl.h @@ -22,7 +22,6 @@ class TCPWebSocketConnectionImpl final : public AbstractWebSocketImpl { public: virtual ~TCPWebSocketConnectionImpl() override; - explicit TCPWebSocketConnectionImpl(Core::Object* parent = nullptr); virtual void connect(ConnectionInfo const& connection) override; @@ -39,6 +38,8 @@ public: virtual void discard_connection() override; private: + explicit TCPWebSocketConnectionImpl(Core::Object* parent = nullptr); + RefPtr<Core::Notifier> m_notifier; RefPtr<Core::TCPSocket> m_socket; }; diff --git a/Userland/Libraries/LibWebSocket/Impl/TLSv12WebSocketConnectionImpl.h b/Userland/Libraries/LibWebSocket/Impl/TLSv12WebSocketConnectionImpl.h index fecdd4d38f..6cfe8b1592 100644 --- a/Userland/Libraries/LibWebSocket/Impl/TLSv12WebSocketConnectionImpl.h +++ b/Userland/Libraries/LibWebSocket/Impl/TLSv12WebSocketConnectionImpl.h @@ -21,7 +21,6 @@ class TLSv12WebSocketConnectionImpl final : public AbstractWebSocketImpl { public: virtual ~TLSv12WebSocketConnectionImpl() override; - explicit TLSv12WebSocketConnectionImpl(Core::Object* parent = nullptr); void connect(ConnectionInfo const& connection) override; @@ -38,6 +37,8 @@ public: virtual void discard_connection() override; private: + explicit TLSv12WebSocketConnectionImpl(Core::Object* parent = nullptr); + RefPtr<TLS::TLSv12> m_socket; }; |