LibJS: Convert ECMAScriptFunctionObject::create() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-13 20:49:50 +00:00
commit 73efdb1cc4
Notes: sideshowbarker 2024-07-17 14:36:19 +09:00
8 changed files with 17 additions and 18 deletions

View file

@ -985,7 +985,7 @@ ThrowCompletionOr<void> eval_declaration_instantiation(VM& vm, Program const& pr
for (auto& declaration : functions_to_initialize.in_reverse()) {
// a. Let fn be the sole element of the BoundNames of f.
// b. Let fo be InstantiateFunctionObject of f with arguments lexEnv and privateEnv.
auto* function = ECMAScriptFunctionObject::create(realm, declaration.name(), declaration.source_text(), declaration.body(), declaration.parameters(), declaration.function_length(), lexical_environment, private_environment, declaration.kind(), declaration.is_strict_mode(), declaration.might_need_arguments_object());
auto function = ECMAScriptFunctionObject::create(realm, declaration.name(), declaration.source_text(), declaration.body(), declaration.parameters(), declaration.function_length(), lexical_environment, private_environment, declaration.kind(), declaration.is_strict_mode(), declaration.might_need_arguments_object());
// c. If varEnv is a global Environment Record, then
if (global_var_environment) {