Always check operation callback on backwards branches (484035, r=brendan).

This commit is contained in:
Andreas Gal 2009-03-19 01:07:31 -07:00
parent 3b47fbb12c
commit 47b45e60e7

View File

@ -2713,12 +2713,14 @@ js_Interpret(JSContext *cx)
JS_BEGIN_MACRO \ JS_BEGIN_MACRO \
regs.pc += (n); \ regs.pc += (n); \
op = (JSOp) *regs.pc; \ op = (JSOp) *regs.pc; \
if (op == JSOP_NOP) { \ if ((n) <= 0) { \
op = (JSOp) *++regs.pc; \
} else if (op == JSOP_LOOP) { \
CHECK_BRANCH(); \ CHECK_BRANCH(); \
MONITOR_BRANCH(); \ if (op == JSOP_NOP) { \
op = (JSOp) *regs.pc; \ op = (JSOp) *++regs.pc; \
} else if (op == JSOP_LOOP) { \
MONITOR_BRANCH(); \
op = (JSOp) *regs.pc; \
} \
} \ } \
DO_OP(); \ DO_OP(); \
JS_END_MACRO JS_END_MACRO