mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:25:07 +00:00
LibJS: Convert ECMAScriptFunctionObject::create() to NonnullGCPtr
This commit is contained in:
parent
790b21c8b5
commit
73efdb1cc4
8 changed files with 17 additions and 18 deletions
|
@ -481,7 +481,7 @@ ThrowCompletionOr<void> SourceTextModule::initialize_environment(VM& vm)
|
|||
FlyString function_name = function_declaration.name();
|
||||
if (function_name == ExportStatement::local_name_for_default)
|
||||
function_name = "default"sv;
|
||||
auto* function = ECMAScriptFunctionObject::create(realm(), function_name, function_declaration.source_text(), function_declaration.body(), function_declaration.parameters(), function_declaration.function_length(), environment, private_environment, function_declaration.kind(), function_declaration.is_strict_mode(), function_declaration.might_need_arguments_object(), function_declaration.contains_direct_call_to_eval());
|
||||
auto function = ECMAScriptFunctionObject::create(realm(), function_name, function_declaration.source_text(), function_declaration.body(), function_declaration.parameters(), function_declaration.function_length(), environment, private_environment, function_declaration.kind(), function_declaration.is_strict_mode(), function_declaration.might_need_arguments_object(), function_declaration.contains_direct_call_to_eval());
|
||||
|
||||
// 2. Perform ! env.InitializeBinding(dn, fo).
|
||||
MUST(environment->initialize_binding(vm, name, function));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue