mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +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
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