summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-25 12:37:44 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-25 12:37:44 +0200
commit6b62ffb2949a1f8b86df13b174e19cc5cc3def3f (patch)
tree31174b7f5a304db094b1fb6fbd3ff7bd4d9b850e /js
parentf0883feb51e0471c047c513b92a63f55ffe43e00 (diff)
downloaduxp-6b62ffb2949a1f8b86df13b174e19cc5cc3def3f.tar.gz
Bug 1332155 - Skip non-try-related trynotes when asserting jump targets
Issue mcp-graveyard/UXP#74
Diffstat (limited to 'js')
-rw-r--r--js/src/jsscript.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp
index 929251d8b4..e86ceab3d0 100644
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -2804,9 +2804,10 @@ JSScript::assertValidJumpTargets() const
for (; tn < tnlimit; tn++) {
jsbytecode* tryStart = mainEntry + tn->start;
jsbytecode* tryPc = tryStart - 1;
- if (JSOp(*tryPc) != JSOP_TRY)
+ if (tn->kind != JSTRY_CATCH && tn->kind != JSTRY_FINALLY)
continue;
+ MOZ_ASSERT(JSOp(*tryPc) == JSOP_TRY);
jsbytecode* tryTarget = tryStart + tn->length;
MOZ_ASSERT(mainEntry <= tryTarget && tryTarget < end);
MOZ_ASSERT(BytecodeIsJumpTarget(JSOp(*tryTarget)));