diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-02-27 20:09:26 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 13:00:11 +0200 |
commit | e7841ab5d740eb70f2975212de4a1066d8714438 (patch) | |
tree | d699b22a0de4ab35e953c6fe205c90374956b30b /js/src/frontend/NameFunctions.cpp | |
parent | dba09fa5c43276bb455cc4da6bd0ec302f798189 (diff) | |
download | UXP-e7841ab5d740eb70f2975212de4a1066d8714438.tar UXP-e7841ab5d740eb70f2975212de4a1066d8714438.tar.gz UXP-e7841ab5d740eb70f2975212de4a1066d8714438.tar.lz UXP-e7841ab5d740eb70f2975212de4a1066d8714438.tar.xz UXP-e7841ab5d740eb70f2975212de4a1066d8714438.zip |
Issue #1465 - Implement optional catch binding.
Diffstat (limited to 'js/src/frontend/NameFunctions.cpp')
-rw-r--r-- | js/src/frontend/NameFunctions.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/frontend/NameFunctions.cpp b/js/src/frontend/NameFunctions.cpp index 376be7624..db70bb5b4 100644 --- a/js/src/frontend/NameFunctions.cpp +++ b/js/src/frontend/NameFunctions.cpp @@ -651,8 +651,10 @@ class NameResolver // contain arbitrary expressions. case PNK_CATCH: MOZ_ASSERT(cur->isArity(PN_TERNARY)); - if (!resolve(cur->pn_kid1, prefix)) - return false; + if (cur->pn_kid1) { + if (!resolve(cur->pn_kid1, prefix)) + return false; + } if (cur->pn_kid2) { if (!resolve(cur->pn_kid2, prefix)) return false; |