diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-08 15:03:53 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:15 -0400 |
commit | 986ae6266566447f22be68caf6371cbf98cafd52 (patch) | |
tree | b07587264a039e817a5fa003f7e8060c543e1db9 /js/src/frontend/Parser.h | |
parent | 7ecc50d90d13690d610f26d0056a326e52bc834c (diff) | |
download | UXP-986ae6266566447f22be68caf6371cbf98cafd52.tar UXP-986ae6266566447f22be68caf6371cbf98cafd52.tar.gz UXP-986ae6266566447f22be68caf6371cbf98cafd52.tar.lz UXP-986ae6266566447f22be68caf6371cbf98cafd52.tar.xz UXP-986ae6266566447f22be68caf6371cbf98cafd52.zip |
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.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h index 41abb6d76..f6cff8a6c 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); |