1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:57:44 +00:00

LibJS: Convert ArrayBuffer construction to ThrowCompletionOr

This also allows us to create TypedArrays with an existing buffer thus
clearing up an additional FIXME in TextEncoder.
This commit is contained in:
davidot 2022-02-07 13:34:32 +01:00 committed by Linus Groh
parent 4136cbdb09
commit de90d54be0
7 changed files with 30 additions and 26 deletions

View file

@ -25,7 +25,7 @@ class ArrayBuffer : public Object {
JS_OBJECT(ArrayBuffer, Object);
public:
static ArrayBuffer* create(GlobalObject&, size_t);
static ThrowCompletionOr<ArrayBuffer*> create(GlobalObject&, size_t);
static ArrayBuffer* create(GlobalObject&, ByteBuffer);
static ArrayBuffer* create(GlobalObject&, ByteBuffer*);