mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +00:00
Kernel: Remove OOM unsafe DoubleBuffer constructor
Remove this dangerous and now unused constructor.
This commit is contained in:
parent
ca94a83337
commit
cbb263e350
Notes:
sideshowbarker
2024-07-18 07:31:48 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/cbb263e350b Pull-request: https://github.com/SerenityOS/serenity/pull/9154 Reviewed-by: https://github.com/alimpfard ✅
2 changed files with 0 additions and 6 deletions
|
@ -26,11 +26,6 @@ OwnPtr<DoubleBuffer> DoubleBuffer::try_create(size_t capacity)
|
||||||
return adopt_own_if_nonnull(new (nothrow) DoubleBuffer(capacity, storage.release_nonnull()));
|
return adopt_own_if_nonnull(new (nothrow) DoubleBuffer(capacity, storage.release_nonnull()));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoubleBuffer::DoubleBuffer(size_t capacity)
|
|
||||||
: DoubleBuffer(capacity, KBuffer::try_create_with_size(capacity * 2, Region::Access::Read | Region::Access::Write, "DoubleBuffer").release_nonnull())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
DoubleBuffer::DoubleBuffer(size_t capacity, NonnullOwnPtr<KBuffer> storage)
|
DoubleBuffer::DoubleBuffer(size_t capacity, NonnullOwnPtr<KBuffer> storage)
|
||||||
: m_write_buffer(&m_buffer1)
|
: m_write_buffer(&m_buffer1)
|
||||||
, m_read_buffer(&m_buffer2)
|
, m_read_buffer(&m_buffer2)
|
||||||
|
|
|
@ -17,7 +17,6 @@ namespace Kernel {
|
||||||
class DoubleBuffer {
|
class DoubleBuffer {
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] static OwnPtr<DoubleBuffer> try_create(size_t capacity = 65536);
|
[[nodiscard]] static OwnPtr<DoubleBuffer> try_create(size_t capacity = 65536);
|
||||||
explicit DoubleBuffer(size_t capacity = 65536);
|
|
||||||
[[nodiscard]] KResultOr<size_t> write(const UserOrKernelBuffer&, size_t);
|
[[nodiscard]] KResultOr<size_t> write(const UserOrKernelBuffer&, size_t);
|
||||||
[[nodiscard]] KResultOr<size_t> write(const u8* data, size_t size)
|
[[nodiscard]] KResultOr<size_t> write(const u8* data, size_t size)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue