Xray wrappers don't cache resolved native properties on the holder object (bug 633382, r=mrbkap, a=blocker).

This commit is contained in:
Andreas Gal 2011-02-14 18:26:20 -08:00
Родитель 90fd497f4d
Коммит 8370276722
1 изменённых файлов: 10 добавлений и 5 удалений

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

@ -442,13 +442,18 @@ XrayWrapper<Base>::resolveOwnProperty(JSContext *cx, JSObject *wrapper, jsid id,
JSObject *holder = GetHolder(wrapper);
JSObject *expando = GetExpandoObject(holder);
if (expando) {
if (!JS_GetPropertyDescriptorById(cx, expando, id,
(set ? JSRESOLVE_ASSIGNING : 0) | JSRESOLVE_QUALIFIED,
desc)) {
if (!JS_GetPropertyDescriptorById(cx, expando, id, 0, desc)) {
return false;
}
if (desc->obj) {
return true;
}
}
if (desc->obj)
if (!JS_GetPropertyDescriptorById(cx, holder, id, 0, desc)) {
return false;
}
if (desc->obj) {
return true;
}