mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibJS: Convert Array AOs to ThrowCompletionOr
This commit is contained in:
parent
3426285738
commit
db5df26841
Notes:
sideshowbarker
2024-07-18 02:03:29 +09:00
Author: https://github.com/IdanHo
Commit: db5df26841
Pull-request: https://github.com/SerenityOS/serenity/pull/10568
Reviewed-by: https://github.com/linusg ✅
14 changed files with 37 additions and 64 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue