mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
fix js_IsLoopExit to better handle for-in exits, r=mrbkap
This commit is contained in:
parent
49f0b4f6cb
commit
9817a0cd97
@ -1221,8 +1221,16 @@ js_IsLoopExit(JSContext* cx, JSScript* script, jsbytecode* pc)
|
||||
pc++;
|
||||
/* FALL THROUGH */
|
||||
|
||||
case JSOP_IFEQ:
|
||||
case JSOP_IFEQX:
|
||||
case JSOP_IFNE:
|
||||
case JSOP_IFNEX:
|
||||
/*
|
||||
* Forward jumps are usually intra-branch, but for-in loops jump to the trailing enditer to
|
||||
* clean up, so check for that case here.
|
||||
*/
|
||||
if (pc[GET_JUMP_OFFSET(pc)] == JSOP_ENDITER)
|
||||
return true;
|
||||
return GET_JUMP_OFFSET(pc) < 0;
|
||||
|
||||
default:;
|
||||
|
Loading…
Reference in New Issue
Block a user