diff options
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 689fa02b4..fcda44a84 100644 --- a/js/src/frontend/FoldConstants.cpp +++ b/js/src/frontend/FoldConstants.cpp @@ -1259,9 +1259,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)) |