mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-01 03:57:30 +09:00
Bug 1332881 - Handle stack value in correct order when leaving loop and try-finally
Issue #74
This commit is contained in:
parent
da23a493b7
commit
ad8ad6e109
2 changed files with 60 additions and 0 deletions
|
|
@ -2359,6 +2359,9 @@ NonLocalExitControl::prepareForNonLocalJump(BytecodeEmitter::NestableControl* ta
|
|||
}
|
||||
|
||||
case StatementKind::ForOfLoop:
|
||||
if (!flushPops(bce_))
|
||||
return false;
|
||||
|
||||
// The iterator and the current value are on the stack.
|
||||
//
|
||||
if (emitIteratorClose) {
|
||||
|
|
@ -2378,6 +2381,9 @@ NonLocalExitControl::prepareForNonLocalJump(BytecodeEmitter::NestableControl* ta
|
|||
break;
|
||||
|
||||
case StatementKind::ForInLoop:
|
||||
if (!flushPops(bce_))
|
||||
return false;
|
||||
|
||||
// The iterator and the current value are on the stack.
|
||||
if (!bce_->emit1(JSOP_POP)) // ... ITER
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue