1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:18:13 +00: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:
Ben Wiederhake 2021-10-31 23:38:04 +01:00 committed by Andreas Kling
parent 3796d417e0
commit b3e9a4e603
19 changed files with 62 additions and 50 deletions

View file

@ -18,12 +18,6 @@ namespace HTTP {
class HttpsJob final : public Job {
C_OBJECT(HttpsJob)
public:
explicit HttpsJob(const HttpRequest& request, OutputStream& output_stream, const Vector<Certificate>* override_certs = nullptr)
: Job(request, output_stream)
, m_override_ca_certificates(override_certs)
{
}
virtual ~HttpsJob() override
{
}
@ -51,6 +45,12 @@ protected:
virtual void read_while_data_available(Function<IterationDecision()>) override;
private:
explicit HttpsJob(const HttpRequest& request, OutputStream& output_stream, const Vector<Certificate>* override_certs = nullptr)
: Job(request, output_stream)
, m_override_ca_certificates(override_certs)
{
}
RefPtr<TLS::TLSv12> m_socket;
const Vector<Certificate>* m_override_ca_certificates { nullptr };
};