summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWebSocket
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/LibWebSocket
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/LibWebSocket')
-rw-r--r--Userland/Libraries/LibWebSocket/Impl/TCPWebSocketConnectionImpl.h3
-rw-r--r--Userland/Libraries/LibWebSocket/Impl/TLSv12WebSocketConnectionImpl.h3
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;
};