mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibJS: Handle possible allocation failure in ArrayBuffer(size_t)
...by replacing it with a ctor that takes the buffer instead, and handling the allocation failure in ArrayBuffer::create(size_t) by throwing a RangeError as specified by the spec.
This commit is contained in:
parent
d20fc922c5
commit
7589cc2494
Notes:
sideshowbarker
2024-07-18 04:39:32 +09:00
Author: https://github.com/alimpfard
Commit: 7589cc2494
Pull-request: https://github.com/SerenityOS/serenity/pull/9832
Reviewed-by: https://github.com/IdanHo
5 changed files with 22 additions and 6 deletions
|
@ -27,7 +27,7 @@ public:
|
|||
static ArrayBuffer* create(GlobalObject&, size_t);
|
||||
static ArrayBuffer* create(GlobalObject&, ByteBuffer*);
|
||||
|
||||
ArrayBuffer(size_t, Object& prototype);
|
||||
ArrayBuffer(ByteBuffer buffer, Object& prototype);
|
||||
ArrayBuffer(ByteBuffer* buffer, Object& prototype);
|
||||
virtual ~ArrayBuffer() override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue