mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
Kernel: Make PrivateInodeVMObject factory APIs OOM safe
This commit is contained in:
committed by
Andreas Kling
parent
d947253c51
commit
65d5f81afc
@@ -9,14 +9,14 @@
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
NonnullRefPtr<PrivateInodeVMObject> PrivateInodeVMObject::create_with_inode(Inode& inode)
|
||||
RefPtr<PrivateInodeVMObject> PrivateInodeVMObject::create_with_inode(Inode& inode)
|
||||
{
|
||||
return adopt_ref(*new PrivateInodeVMObject(inode, inode.size()));
|
||||
return adopt_ref_if_nonnull(new PrivateInodeVMObject(inode, inode.size()));
|
||||
}
|
||||
|
||||
RefPtr<VMObject> PrivateInodeVMObject::clone()
|
||||
{
|
||||
return adopt_ref(*new PrivateInodeVMObject(*this));
|
||||
return adopt_ref_if_nonnull(new PrivateInodeVMObject(*this));
|
||||
}
|
||||
|
||||
PrivateInodeVMObject::PrivateInodeVMObject(Inode& inode, size_t size)
|
||||
|
||||
Reference in New Issue
Block a user