summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/ParseNode.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
commit39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch)
tree52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /js/src/frontend/ParseNode.cpp
parenta1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff)
parentc2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff)
downloadUXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'js/src/frontend/ParseNode.cpp')
-rw-r--r--js/src/frontend/ParseNode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/js/src/frontend/ParseNode.cpp b/js/src/frontend/ParseNode.cpp
index 42ae9451a..e01a41067 100644
--- a/js/src/frontend/ParseNode.cpp
+++ b/js/src/frontend/ParseNode.cpp
@@ -409,13 +409,14 @@ PushNodeChildren(ParseNode* pn, NodeStack* stack)
return PushResult::Recyclable;
}
- // A catch node has first kid as catch-variable pattern, the second kid
- // as catch condition (which, if non-null, records the |<cond>| in
- // SpiderMonkey's |catch (e if <cond>)| extension), and third kid as the
- // statements in the catch block.
+ // A catch node has an (optional) first kid as catch-variable pattern,
+ // the second kid as (optional) catch condition (which, records the
+ // |<cond>| in SpiderMonkey's |catch (e if <cond>)| extension), and
+ // third kid as the statements in the catch block.
case PNK_CATCH: {
MOZ_ASSERT(pn->isArity(PN_TERNARY));
- stack->push(pn->pn_kid1);
+ if (pn->pn_kid1)
+ stack->push(pn->pn_kid1);
if (pn->pn_kid2)
stack->push(pn->pn_kid2);
stack->push(pn->pn_kid3);