summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Array.h
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-10-22 01:34:06 +0300
committerIdan Horowitz <idan.horowitz@gmail.com>2021-10-22 15:07:04 +0300
commitdb5df2684124ac0e2815cb7d206975241a481860 (patch)
tree7760ea8ad37cdf3b1fd6412d5d2ca1156a70167e /Userland/Libraries/LibJS/Runtime/Array.h
parent3426285738e54d524c125b0e8d38e01963c48212 (diff)
downloadserenity-db5df2684124ac0e2815cb7d206975241a481860.zip
LibJS: Convert Array AOs to ThrowCompletionOr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Array.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Array.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Array.h b/Userland/Libraries/LibJS/Runtime/Array.h
index c8b6fb1f66..b1e394f571 100644
--- a/Userland/Libraries/LibJS/Runtime/Array.h
+++ b/Userland/Libraries/LibJS/Runtime/Array.h
@@ -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 };
};