Properly handle errors during lookup when recording JSOP_IN (569384, r=luke).

This commit is contained in:
Andreas Gal 2010-06-01 15:45:16 -07:00
parent 9c5f58d3ca
commit 0119ec2a9a

View File

@ -14013,6 +14013,9 @@ TraceRecorder::record_JSOP_IN()
JSProperty* prop; JSProperty* prop;
JSBool ok = obj->lookupProperty(cx, id, &obj2, &prop); JSBool ok = obj->lookupProperty(cx, id, &obj2, &prop);
if (!ok)
RETURN_ERROR_A("obj->lookupProperty failed in JSOP_IN");
/* lookupProperty can reenter the interpreter and kill |this|. */ /* lookupProperty can reenter the interpreter and kill |this|. */
if (!localtm.recorder) { if (!localtm.recorder) {
if (prop) if (prop)
@ -14020,8 +14023,6 @@ TraceRecorder::record_JSOP_IN()
return ARECORD_ABORTED; return ARECORD_ABORTED;
} }
if (!ok)
RETURN_ERROR_A("obj->lookupProperty failed in JSOP_IN");
bool cond = prop != NULL; bool cond = prop != NULL;
if (prop) if (prop)
obj2->dropProperty(cx, prop); obj2->dropProperty(cx, prop);