Missing unlock in propcache setprop/setname code, plus two cleanups (416478, r=shaver, mad props to jorendorff).

This commit is contained in:
brendan@mozilla.org 2008-02-08 19:02:57 -08:00
parent ff988b85a3
commit cca60ec58a

View File

@ -610,7 +610,6 @@ js_EnablePropertyCache(JSContext *cx)
sp--; \
JS_END_MACRO
/* SAVE_SP_AND_PC must be already called. */
#define VALUE_TO_OBJECT(cx, n, v, obj) \
JS_BEGIN_MACRO \
if (!JSVAL_IS_PRIMITIVE(v)) { \
@ -2427,8 +2426,10 @@ js_Interpret(JSContext *cx, jsbytecode *pc, jsval *result)
ok = !cx->throwing;
if (!ok) {
#ifdef DEBUG_NOT_THROWING
printf("JS INTERPRETER CALLED WITH PENDING EXCEPTION %lx\n",
(unsigned long) cx->exception);
if (cx->exception != JSVAL_ARETURN) {
printf("JS INTERPRETER CALLED WITH PENDING EXCEPTION %lx\n",
(unsigned long) cx->exception);
}
#endif
goto out;
}
@ -4160,6 +4161,7 @@ interrupt:
PCMETER(cache->pchits++);
PCMETER(cache->setpchits++);
NATIVE_SET(cx, obj, sprop, &rval);
JS_UNLOCK_SCOPE(cx, scope);
break;
}
} else {