Bug 499772 - TM: TraceRecorder::test_property_cache needs JSClass.getProperty checks when a property isn't found on an object. r=jorendorff, r=brendan

This commit is contained in:
Jeff Walden 2009-06-22 14:35:57 -07:00
Родитель 3247924303
Коммит 728a217de8
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -9268,9 +9268,19 @@ TraceRecorder::prop(JSObject* obj, LIns* obj_ins, uint32& slot, LIns*& v_ins)
/* Check for non-existent property reference, which results in undefined. */
const JSCodeSpec& cs = js_CodeSpec[*cx->fp->regs->pc];
if (PCVAL_IS_NULL(pcval)) {
/*
* We could specialize to guard on just JSClass.getProperty, but a mere
* class guard is simpler and slightly faster.
*/
if (OBJ_GET_CLASS(cx, obj)->getProperty != JS_PropertyStub) {
ABORT_TRACE("can't trace through access to undefined property if "
"JSClass.getProperty hook isn't stubbed");
}
guardClass(obj, obj_ins, OBJ_GET_CLASS(cx, obj), snapshot(MISMATCH_EXIT));
/*
* This trace will be valid as long as neither the object nor any object
* on its prototype chain change shape.
* on its prototype chain changes shape.
*/
VMSideExit* exit = snapshot(BRANCH_EXIT);
for (;;) {