mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:47:45 +00:00
LibJS: Convert Array AOs to ThrowCompletionOr
This commit is contained in:
parent
3426285738
commit
db5df26841
14 changed files with 37 additions and 64 deletions
|
@ -19,7 +19,7 @@ class Array : public Object {
|
|||
JS_OBJECT(Array, Object);
|
||||
|
||||
public:
|
||||
static Array* create(GlobalObject&, size_t length, Object* prototype = nullptr);
|
||||
static ThrowCompletionOr<Array*> create(GlobalObject&, size_t length, Object* prototype = nullptr);
|
||||
static Array* create_from(GlobalObject&, Vector<Value> const&);
|
||||
// Non-standard but equivalent to CreateArrayFromList.
|
||||
template<typename T>
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
[[nodiscard]] bool length_is_writable() const { return m_length_writable; };
|
||||
|
||||
private:
|
||||
bool set_length(PropertyDescriptor const&);
|
||||
ThrowCompletionOr<bool> set_length(PropertyDescriptor const&);
|
||||
|
||||
bool m_length_writable { true };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue