diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-27 20:09:26 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-27 20:09:26 +0100 |
commit | ae8eb4d4c42d96c264d5036e1c50e8c1d0d55425 (patch) | |
tree | 061997488fc462caeae817e6547d3a30351c8a8d /js/src/frontend/FoldConstants.cpp | |
parent | 793da7dd6238ce156e29c71304e24b2c05edc11d (diff) | |
download | UXP-ae8eb4d4c42d96c264d5036e1c50e8c1d0d55425.tar UXP-ae8eb4d4c42d96c264d5036e1c50e8c1d0d55425.tar.gz UXP-ae8eb4d4c42d96c264d5036e1c50e8c1d0d55425.tar.lz UXP-ae8eb4d4c42d96c264d5036e1c50e8c1d0d55425.tar.xz UXP-ae8eb4d4c42d96c264d5036e1c50e8c1d0d55425.zip |
Issue #1465 - Implement optional catch binding.
Diffstat (limited to 'js/src/frontend/FoldConstants.cpp')
-rw-r--r-- | js/src/frontend/FoldConstants.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/frontend/FoldConstants.cpp b/js/src/frontend/FoldConstants.cpp index 16294c4a8..b460b92b6 100644 --- a/js/src/frontend/FoldConstants.cpp +++ b/js/src/frontend/FoldConstants.cpp @@ -1260,9 +1260,10 @@ FoldCatch(ExclusiveContext* cx, ParseNode* node, Parser<FullParseHandler>& parse MOZ_ASSERT(node->isKind(PNK_CATCH)); MOZ_ASSERT(node->isArity(PN_TERNARY)); - ParseNode*& declPattern = node->pn_kid1; - if (!Fold(cx, &declPattern, parser, inGenexpLambda)) - return false; + if (ParseNode*& declPattern = node->pn_kid1) { + if (!Fold(cx, &declPattern, parser, inGenexpLambda)) + return false; + } if (ParseNode*& cond = node->pn_kid2) { if (!FoldCondition(cx, &cond, parser, inGenexpLambda)) |