mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
Kernel: Fix weird Region constructor that took nullable RefPtr<Inode>
It's never valid to construct a Region with a null Inode pointer using this constructor, so just take a NonnullRefPtr<Inode> instead.
This commit is contained in:
parent
9b2dc36229
commit
e3dda4e87b
Notes:
sideshowbarker
2024-07-19 11:26:26 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e3dda4e87b3
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ Region::Region(const Range& range, const String& name, u8 access)
|
|||
MM.register_region(*this);
|
||||
}
|
||||
|
||||
Region::Region(const Range& range, RefPtr<Inode>&& inode, const String& name, u8 access)
|
||||
Region::Region(const Range& range, NonnullRefPtr<Inode> inode, const String& name, u8 access)
|
||||
: m_range(range)
|
||||
, m_vmobject(InodeVMObject::create_with_inode(*inode))
|
||||
, m_name(name)
|
||||
|
|
|
@ -131,7 +131,7 @@ public:
|
|||
// NOTE: These are public so we can make<> them.
|
||||
Region(const Range&, const String&, u8 access);
|
||||
Region(const Range&, NonnullRefPtr<VMObject>, size_t offset_in_vmo, const String&, u8 access);
|
||||
Region(const Range&, RefPtr<Inode>&&, const String&, u8 access);
|
||||
Region(const Range&, NonnullRefPtr<Inode>, const String&, u8 access);
|
||||
|
||||
private:
|
||||
Bitmap& ensure_cow_map() const;
|
||||
|
|
Loading…
Reference in a new issue