mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +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:
parent
3796d417e0
commit
b3e9a4e603
19 changed files with 62 additions and 50 deletions
|
@ -18,11 +18,6 @@ namespace HTTP {
|
|||
class HttpJob final : public Job {
|
||||
C_OBJECT(HttpJob)
|
||||
public:
|
||||
explicit HttpJob(const HttpRequest& request, OutputStream& output_stream)
|
||||
: Job(request, output_stream)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~HttpJob() override
|
||||
{
|
||||
}
|
||||
|
@ -46,6 +41,11 @@ protected:
|
|||
virtual bool is_established() const override { return true; }
|
||||
|
||||
private:
|
||||
explicit HttpJob(const HttpRequest& request, OutputStream& output_stream)
|
||||
: Job(request, output_stream)
|
||||
{
|
||||
}
|
||||
|
||||
RefPtr<Core::Socket> m_socket;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue