mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Bug 1331585 - Allow falsy "done" values for IteratorClose due to exception during array destructuring
Issue #74
This commit is contained in:
parent
b8eb17e022
commit
4ac4296fce
3 changed files with 25 additions and 8 deletions
|
|
@ -1205,8 +1205,9 @@ ProcessTryNotes(JSContext* cx, EnvironmentIter& ei, InterpreterRegs& regs)
|
|||
// stack. The iterator object is second from the top.
|
||||
MOZ_ASSERT(tn->stackDepth > 1);
|
||||
Value* sp = regs.spForStackDepth(tn->stackDepth);
|
||||
MOZ_ASSERT(sp[-1].isBoolean());
|
||||
if (sp[-1].isFalse()) {
|
||||
RootedValue doneValue(cx, sp[-1]);
|
||||
bool done = ToBoolean(doneValue);
|
||||
if (!done) {
|
||||
RootedObject iterObject(cx, &sp[-2].toObject());
|
||||
if (!IteratorCloseForException(cx, iterObject)) {
|
||||
SettleOnTryNote(cx, tn, ei, regs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue