diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 210d56f2ec88..d6054b04d89b 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -2249,7 +2249,6 @@ Parser::standaloneLazyFunction(HandleFunction fun, unsigned st return null(); } - if (fun->isNamedLambda()) { if (AtomDefnPtr p = pc->lexdeps->lookup(fun->name())) { Definition *dn = p.value().get(); @@ -2263,6 +2262,9 @@ Parser::standaloneLazyFunction(HandleFunction fun, unsigned st if (!pc->generateFunctionBindings(context, alloc, bindings)) return null(); + if (!FoldConstants(context, &pn, this)) + return null(); + return pn; }