summaryrefslogtreecommitdiffstats
path: root/js/src
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
commit3df7c50fcccff433e4e24a0f1ce26859977948b4 (patch)
tree31174b7f5a304db094b1fb6fbd3ff7bd4d9b850e /js/src
parent8bb9649135c384a08b78295b9d07be32d50967d1 (diff)
downloadUXP-3df7c50fcccff433e4e24a0f1ce26859977948b4.tar
UXP-3df7c50fcccff433e4e24a0f1ce26859977948b4.tar.gz
UXP-3df7c50fcccff433e4e24a0f1ce26859977948b4.tar.lz
UXP-3df7c50fcccff433e4e24a0f1ce26859977948b4.tar.xz
UXP-3df7c50fcccff433e4e24a0f1ce26859977948b4.zip
Bug 1332155 - Skip non-try-related trynotes when asserting jump targets
Issue #74
Diffstat (limited to 'js/src')
-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 929251d8b..e86ceab3d 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)));