mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
Kernel: Make File::unref virtual
This is required for SlavePTY's custom unref handler to function correctly, as otherwise a SlavePTY held in a File RefPtr would call the base's (RefCounted<>) unref method instead of SlavePTY's version.
This commit is contained in:
parent
6dee1e91be
commit
9d034785de
2 changed files with 2 additions and 1 deletions
|
@ -74,6 +74,7 @@ class File
|
|||
: public RefCounted<File>
|
||||
, public Weakable<File> {
|
||||
public:
|
||||
virtual bool unref() const { return RefCounted<File>::unref(); }
|
||||
virtual void will_be_destroyed() { }
|
||||
virtual ~File();
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ class MasterPTY;
|
|||
|
||||
class SlavePTY final : public TTY {
|
||||
public:
|
||||
bool unref() const;
|
||||
virtual bool unref() const override;
|
||||
virtual ~SlavePTY() override;
|
||||
|
||||
void on_master_write(const UserOrKernelBuffer&, size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue