summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-07-06 12:21:12 +0100
committerLinus Groh <mail@linusgroh.de>2021-07-06 13:25:37 +0100
commit3faeabf1dc1a8e0377b46741480a21435d7e6dcd (patch)
treed5c031a0c45d7cc8f67ad361ad12999b1e0cff88 /Userland/Libraries/LibJS/AST.cpp
parent73183ee5c440c4cb1777712f1689697bf37532b4 (diff)
downloadserenity-3faeabf1dc1a8e0377b46741480a21435d7e6dcd.zip
Revert "LibJS: Don't hoist functions under certain circumstances"
This reverts commit 3411d50737725b382ae526e91a8bbd60656c3323. It was causing LeakSanitizer on CI to fail, possibly due to a circular reference.
Diffstat (limited to 'Userland/Libraries/LibJS/AST.cpp')
-rw-r--r--Userland/Libraries/LibJS/AST.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/AST.cpp b/Userland/Libraries/LibJS/AST.cpp
index db0485caf0..23b16fb21b 100644
--- a/Userland/Libraries/LibJS/AST.cpp
+++ b/Userland/Libraries/LibJS/AST.cpp
@@ -2377,9 +2377,9 @@ void ScopeNode::add_functions(NonnullRefPtrVector<FunctionDeclaration> functions
m_functions.extend(move(functions));
}
-void ScopeNode::add_hoisted_function(NonnullRefPtr<FunctionDeclaration> hoisted_function)
+void ScopeNode::add_hoisted_functions(NonnullRefPtrVector<FunctionDeclaration> hoisted_functions)
{
- m_hoisted_functions.append(hoisted_function);
+ m_hoisted_functions.extend(move(hoisted_functions));
}
}