mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
Kernel: Remove infallible VMObject resource factory functions
These infallible resource factory functions were only there to ease the conversion to the new factory functions. Since all child classes of VMObject now use the fallible resource factory functions, we don't need the infallible versions anymore.
This commit is contained in:
parent
2a4e410b63
commit
1a2f71581b
Notes:
sideshowbarker
2024-07-17 20:50:01 +09:00
Author: https://github.com/creator1creeper1 Commit: https://github.com/SerenityOS/serenity/commit/1a2f71581b0 Pull-request: https://github.com/SerenityOS/serenity/pull/11843 Reviewed-by: https://github.com/IdanHo ✅ Reviewed-by: https://github.com/bgianfo
2 changed files with 0 additions and 12 deletions
|
@ -22,21 +22,11 @@ ErrorOr<FixedArray<RefPtr<PhysicalPage>>> VMObject::try_clone_physical_pages() c
|
|||
return m_physical_pages.try_clone();
|
||||
}
|
||||
|
||||
FixedArray<RefPtr<PhysicalPage>> VMObject::must_clone_physical_pages_but_fixme_should_propagate_errors() const
|
||||
{
|
||||
return MUST(try_clone_physical_pages());
|
||||
}
|
||||
|
||||
ErrorOr<FixedArray<RefPtr<PhysicalPage>>> VMObject::try_create_physical_pages(size_t size)
|
||||
{
|
||||
return FixedArray<RefPtr<PhysicalPage>>::try_create(ceil_div(size, static_cast<size_t>(PAGE_SIZE)));
|
||||
}
|
||||
|
||||
FixedArray<RefPtr<PhysicalPage>> VMObject::must_create_physical_pages_but_fixme_should_propagate_errors(size_t size)
|
||||
{
|
||||
return MUST(try_create_physical_pages(size));
|
||||
}
|
||||
|
||||
VMObject::VMObject(FixedArray<RefPtr<PhysicalPage>>&& new_physical_pages)
|
||||
: m_physical_pages(move(new_physical_pages))
|
||||
{
|
||||
|
|
|
@ -55,9 +55,7 @@ public:
|
|||
|
||||
protected:
|
||||
static ErrorOr<FixedArray<RefPtr<PhysicalPage>>> try_create_physical_pages(size_t);
|
||||
static FixedArray<RefPtr<PhysicalPage>> must_create_physical_pages_but_fixme_should_propagate_errors(size_t);
|
||||
ErrorOr<FixedArray<RefPtr<PhysicalPage>>> try_clone_physical_pages() const;
|
||||
FixedArray<RefPtr<PhysicalPage>> must_clone_physical_pages_but_fixme_should_propagate_errors() const;
|
||||
explicit VMObject(FixedArray<RefPtr<PhysicalPage>>&&);
|
||||
|
||||
template<typename Callback>
|
||||
|
|
Loading…
Add table
Reference in a new issue