diff --git a/js/src/jsinterp.cpp b/js/src/jsinterp.cpp index 90b333751d39..aa65216da767 100644 --- a/js/src/jsinterp.cpp +++ b/js/src/jsinterp.cpp @@ -2713,12 +2713,14 @@ js_Interpret(JSContext *cx) JS_BEGIN_MACRO \ regs.pc += (n); \ op = (JSOp) *regs.pc; \ - if (op == JSOP_NOP) { \ - op = (JSOp) *++regs.pc; \ - } else if (op == JSOP_LOOP) { \ + if ((n) <= 0) { \ CHECK_BRANCH(); \ - MONITOR_BRANCH(); \ - op = (JSOp) *regs.pc; \ + if (op == JSOP_NOP) { \ + op = (JSOp) *++regs.pc; \ + } else if (op == JSOP_LOOP) { \ + MONITOR_BRANCH(); \ + op = (JSOp) *regs.pc; \ + } \ } \ DO_OP(); \ JS_END_MACRO