mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibJS: Convert internal_own_property_keys() to ThrowCompletionOr
This commit is contained in:
parent
fbfb0bb908
commit
ee8380edea
15 changed files with 56 additions and 92 deletions
|
@ -226,15 +226,13 @@ ThrowCompletionOr<bool> Array::internal_delete(PropertyName const& property_name
|
|||
}
|
||||
|
||||
// NON-STANDARD: Used to inject the ephemeral length property's key
|
||||
MarkedValueList Array::internal_own_property_keys() const
|
||||
ThrowCompletionOr<MarkedValueList> Array::internal_own_property_keys() const
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
auto keys = Object::internal_own_property_keys();
|
||||
if (vm.exception())
|
||||
return MarkedValueList { vm.heap() };
|
||||
auto keys = TRY(Object::internal_own_property_keys());
|
||||
// FIXME: This is pretty expensive, find a better way to do this
|
||||
keys.insert(indexed_properties().real_size(), js_string(vm, vm.names.length.as_string()));
|
||||
return keys;
|
||||
return { move(keys) };
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue