diff --git a/mozilla/js/ref/jsinterp.c b/mozilla/js/ref/jsinterp.c index b77db742adb..4195c66e45d 100644 --- a/mozilla/js/ref/jsinterp.c +++ b/mozilla/js/ref/jsinterp.c @@ -1923,9 +1923,8 @@ js_Interpret(JSContext *cx, jsval *result) if (!ok) { cx->newborn[GCX_OBJECT] = NULL; #if JS_HAS_EXCEPTIONS - if (cx->throwing) { + if (cx->throwing) goto do_throw; - } #endif goto out; } @@ -2631,14 +2630,17 @@ js_Interpret(JSContext *cx, jsval *result) case JSOP_GOSUB: len = GET_JUMP_OFFSET(pc); - PUSH(INT_TO_JSVAL(pc - script->code)); + PR_ASSERT(js_CodeSpec[JSOP_GOSUB].length == 3); + i = pc - script->code + 3; + PUSH(INT_TO_JSVAL(i)); CHECK_BRANCH(len); break; case JSOP_RETSUB: rval = POP(); PR_ASSERT(JSVAL_IS_INT(rval)); - pc = script->code + JSVAL_TO_INT(rval) + 3 /* JSR */; + i = JSVAL_TO_INT(rval); + pc = script->code + i; len = 0; CHECK_BRANCH(-1); break; diff --git a/mozilla/js/ref/jsopcode.c b/mozilla/js/ref/jsopcode.c index 81e1a52c8d0..283eaff2e30 100644 --- a/mozilla/js/ref/jsopcode.c +++ b/mozilla/js/ref/jsopcode.c @@ -917,6 +917,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb) todo = Sprint(&ss->sprinter, ""); break; +#if JS_HAS_EXCEPTIONS case JSOP_GOSUB: case JSOP_RETSUB: case JSOP_SETSP: @@ -928,6 +929,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb) if (sn && SN_TYPE(sn) == SRC_HIDDEN) todo = -2; break; +#endif /* JS_HAS_EXCEPTIONS */ case JSOP_POP: case JSOP_POPV: @@ -1009,6 +1011,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb) todo = -2; break; +#if JS_HAS_EXCEPTIONS case JSOP_THROW: sn = js_GetSrcNote(jp->script, pc); todo = -2; @@ -1017,6 +1020,7 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb) rval = POP_STR(); js_printf(jp, "\t%s %s;\n", cs->name, rval); break; +#endif /* JS_HAS_EXCEPTIONS */ case JSOP_GOTO: sn = js_GetSrcNote(jp->script, pc);