mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 18:47:15 +02:00
LibJS: Convert Array::create{,_from}() to NonnullGCPtr
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 08:42:05 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/91b0123eaf Pull-request: https://github.com/SerenityOS/serenity/pull/16479 Reviewed-by: https://github.com/davidot ✅
@@ -441,7 +441,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::function_declaration_instantia
|
||||
[&](auto const& param) -> ThrowCompletionOr<void> {
|
||||
Value argument_value;
|
||||
if (parameter.is_rest) {
|
||||
auto* array = MUST(Array::create(realm, 0));
|
||||
auto array = MUST(Array::create(realm, 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 = array;
|
||||
|
||||
Reference in New Issue
Block a user