summaryrefslogtreecommitdiff
path: root/js/src/frontend/Parser.h
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-08 15:03:53 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:15 -0400
commit30f6299c5a9a3ba68d592779b0c5404ebe22683d (patch)
treeb07587264a039e817a5fa003f7e8060c543e1db9 /js/src/frontend/Parser.h
parentd5833cd1bf99a3188d02fe4ef77a51aea528d91f (diff)
downloaduxp-30f6299c5a9a3ba68d592779b0c5404ebe22683d.tar.gz
636635 - Do not create named lambda binding for a function created by Function constructor.
Diffstat (limited to 'js/src/frontend/Parser.h')
-rw-r--r--js/src/frontend/Parser.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h
index 41abb6d765..f6cff8a6c5 100644
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -1070,7 +1070,8 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
// ParseContext is already on the stack.
bool functionFormalParametersAndBody(InHandling inHandling, YieldHandling yieldHandling,
Node pn, FunctionSyntaxKind kind,
- mozilla::Maybe<uint32_t> parameterListEnd = mozilla::Nothing());
+ mozilla::Maybe<uint32_t> parameterListEnd = mozilla::Nothing(),
+ bool isStandaloneFunction = false);
// Determine whether |yield| is a valid name in the current context, or
@@ -1350,8 +1351,8 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
GeneratorKind generatorKind, FunctionAsyncKind asyncKind,
bool tryAnnexB,
Directives inheritedDirectives, Directives* newDirectives);
- bool finishFunctionScopes();
- bool finishFunction();
+ bool finishFunctionScopes(bool isStandaloneFunction);
+ bool finishFunction(bool isStandaloneFunction = false);
bool leaveInnerFunction(ParseContext* outerpc);
bool matchOrInsertSemicolonHelper(TokenStream::Modifier modifier);