mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Bug 1346862 - Fix IteratorClose due to non-local jumps being catchable by try statements inside for-of
Issue #74
This commit is contained in:
parent
5bf58e6044
commit
8af5664922
7 changed files with 113 additions and 18 deletions
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue