diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 12:38:28 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 12:38:28 +0200 |
commit | 34533e06a7b6f73bb9cf16058207e97bd91c832c (patch) | |
tree | 43958a8debaa31ad621446d9721556d3ac24047a /js/src/frontend | |
parent | 3df7c50fcccff433e4e24a0f1ce26859977948b4 (diff) | |
download | UXP-34533e06a7b6f73bb9cf16058207e97bd91c832c.tar UXP-34533e06a7b6f73bb9cf16058207e97bd91c832c.tar.gz UXP-34533e06a7b6f73bb9cf16058207e97bd91c832c.tar.lz UXP-34533e06a7b6f73bb9cf16058207e97bd91c832c.tar.xz UXP-34533e06a7b6f73bb9cf16058207e97bd91c832c.zip |
Bug 1332881 - Handle stack value in correct order when leaving loop and try-finally
Issue #74
Diffstat (limited to 'js/src/frontend')
-rw-r--r-- | js/src/frontend/BytecodeEmitter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 98679eac6..bf7797d37 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -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; |