diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 12:56:18 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-25 12:56:18 +0200 |
commit | e641a2c53a857141042ca62f1fe0b63b55a130af (patch) | |
tree | 63a6c5dc142a1be2ae75cb4cfa3871a8c4801d38 /js/src/frontend | |
parent | 34533e06a7b6f73bb9cf16058207e97bd91c832c (diff) | |
download | UXP-e641a2c53a857141042ca62f1fe0b63b55a130af.tar UXP-e641a2c53a857141042ca62f1fe0b63b55a130af.tar.gz UXP-e641a2c53a857141042ca62f1fe0b63b55a130af.tar.lz UXP-e641a2c53a857141042ca62f1fe0b63b55a130af.tar.xz UXP-e641a2c53a857141042ca62f1fe0b63b55a130af.zip |
Bug 1334799 - Handle stack value in correct order when leaving for-of loop from finally block
Issue #74
Diffstat (limited to 'js/src/frontend')
-rw-r--r-- | js/src/frontend/BytecodeEmitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index bf7797d37..76f1f75b5 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -2396,6 +2396,9 @@ NonLocalExitControl::prepareForNonLocalJump(BytecodeEmitter::NestableControl* ta } } + if (!flushPops(bce_)) + return false; + if (target && target->is<ForOfLoopControl>() && emitIteratorCloseAtTarget) { hasForOfLoopsWithIteratorClose = true; if (!target->as<ForOfLoopControl>().finishIterCloseTryNote(bce_)) @@ -2417,9 +2420,6 @@ NonLocalExitControl::prepareForNonLocalJump(BytecodeEmitter::NestableControl* ta return false; } - if (!flushPops(bce_)) - return false; - // See comment in ForOfLoopControl. if (hasForOfLoopsWithIteratorClose) { for (NestableControl* control = bce_->innermostNestableControl; |