mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
Kernel: Make Kernel::VMObject allocation functions return KResultOr
This makes for nicer handling of errors compared to checking whether a RefPtr is null. Additionally, this will give way to return different types of errors in the future.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 05:39:32 +09:00
Author: https://github.com/sin-ack Commit: https://github.com/SerenityOS/serenity/commit/4bfd6e41b95 Pull-request: https://github.com/SerenityOS/serenity/pull/9434 Reviewed-by: https://github.com/awesomekling
@@ -639,6 +639,7 @@ void IntelNativeGraphicsAdapter::initialize_framebuffer_devices()
|
||||
VERIFY(m_framebuffer_height != 0);
|
||||
VERIFY(m_framebuffer_width != 0);
|
||||
m_framebuffer_device = FramebufferDevice::create(*this, 0, address, m_framebuffer_width, m_framebuffer_height, m_framebuffer_pitch);
|
||||
m_framebuffer_device->initialize();
|
||||
// FIXME: Would be nice to be able to return a KResult here.
|
||||
VERIFY(!m_framebuffer_device->initialize().is_error());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user