summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/SourceTextModule.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-13 20:49:50 +0000
committerLinus Groh <mail@linusgroh.de>2022-12-14 09:59:45 +0000
commit73efdb1cc4b0b7e64f8a876d1790592a0ec1eb67 (patch)
tree1b130386d12ba9de94cc7b400131672e27c4616f /Userland/Libraries/LibJS/SourceTextModule.cpp
parent790b21c8b5de9cf0781da1aadd61be5e2eae7a51 (diff)
downloadserenity-73efdb1cc4b0b7e64f8a876d1790592a0ec1eb67.zip
LibJS: Convert ECMAScriptFunctionObject::create() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/SourceTextModule.cpp')
-rw-r--r--Userland/Libraries/LibJS/SourceTextModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/SourceTextModule.cpp b/Userland/Libraries/LibJS/SourceTextModule.cpp
index 68277e4eab..63b3addcaa 100644
--- a/Userland/Libraries/LibJS/SourceTextModule.cpp
+++ b/Userland/Libraries/LibJS/SourceTextModule.cpp
@@ -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));