diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 18:21:15 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 18:21:15 +0200 |
commit | 05441d12b6bbc9dde268914fcfd374db61b83462 (patch) | |
tree | 87443cdcba99085f3a878e9e3a796ef8c3215bbc /js/src/shell | |
parent | 727c27a30d10a811d5a3fe04e2407cd7b3993b5e (diff) | |
download | UXP-05441d12b6bbc9dde268914fcfd374db61b83462.tar UXP-05441d12b6bbc9dde268914fcfd374db61b83462.tar.gz UXP-05441d12b6bbc9dde268914fcfd374db61b83462.tar.lz UXP-05441d12b6bbc9dde268914fcfd374db61b83462.tar.xz UXP-05441d12b6bbc9dde268914fcfd374db61b83462.zip |
Bug 1346862 - Fix IteratorClose due to non-local jumps being catchable by try statements inside for-of
Issue #74
Diffstat (limited to 'js/src/shell')
-rw-r--r-- | js/src/shell/js.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 5d6508d59..b53914942 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -2599,6 +2599,8 @@ TryNoteName(JSTryNoteKind kind) return "for-of"; case JSTRY_LOOP: return "loop"; + case JSTRY_FOR_OF_ITERCLOSE: + return "for-of-iterclose"; case JSTRY_DESTRUCTURING_ITERCLOSE: return "dstr-iterclose"; } @@ -2612,14 +2614,14 @@ TryNotes(JSContext* cx, HandleScript script, Sprinter* sp) if (!script->hasTrynotes()) return true; - if (sp->put("\nException table:\nkind stack start end\n") < 0) + if (sp->put("\nException table:\nkind stack start end\n") < 0) return false; JSTryNote* tn = script->trynotes()->vector; JSTryNote* tnlimit = tn + script->trynotes()->length; do { uint32_t startOff = script->pcToOffset(script->main()) + tn->start; - if (!sp->jsprintf(" %-14s %6u %8u %8u\n", + if (!sp->jsprintf(" %-16s %6u %8u %8u\n", TryNoteName(static_cast<JSTryNoteKind>(tn->kind)), tn->stackDepth, startOff, startOff + tn->length)) { |