зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
3247924303
Коммит
728a217de8
|
@ -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 (;;) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче