mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibJS: Convert Array AOs to ThrowCompletionOr
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 02:03:29 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/db5df268412 Pull-request: https://github.com/SerenityOS/serenity/pull/10568 Reviewed-by: https://github.com/linusg ✅
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user