Abort recording if js_FindIdentifierBase fails (567580, r=brendan).

This commit is contained in:
Andreas Gal 2010-05-24 14:16:58 -07:00
parent 7a314129ce
commit 827b329995

View File

@ -13946,6 +13946,8 @@ TraceRecorder::record_JSOP_BINDNAME()
JSAtom *atom = atoms[GET_INDEX(cx->regs->pc)]; JSAtom *atom = atoms[GET_INDEX(cx->regs->pc)];
jsid id = ATOM_TO_JSID(atom); jsid id = ATOM_TO_JSID(atom);
JSObject *obj2 = js_FindIdentifierBase(cx, fp->scopeChain, id); JSObject *obj2 = js_FindIdentifierBase(cx, fp->scopeChain, id);
if (!obj2)
RETURN_ERROR_A("error in js_FindIdentifierBase");
if (obj2 != globalObj && obj2->getClass() != &js_CallClass) if (obj2 != globalObj && obj2->getClass() != &js_CallClass)
RETURN_STOP_A("BINDNAME on non-global, non-call object"); RETURN_STOP_A("BINDNAME on non-global, non-call object");