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

git-svn-id: svn://10.0.0.236/trunk@245290 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brendan%mozilla.org
2008-02-09 03:02:57 +00:00
parent a37d7d6527
commit 57700d6ddf

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 {