1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:25:08 +00:00

LibJS: Convert Array AOs to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-10-22 01:34:06 +03:00
parent 3426285738
commit db5df26841
14 changed files with 37 additions and 64 deletions

View file

@ -402,7 +402,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
[&](auto const& param) {
Value argument_value;
if (parameter.is_rest) {
auto* array = Array::create(global_object(), 0);
auto* array = MUST(Array::create(global_object(), 0));
for (size_t rest_index = i; rest_index < execution_context_arguments.size(); ++rest_index)
array->indexed_properties().append(execution_context_arguments[rest_index]);
argument_value = move(array);