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
parent 90fd497f4d
commit 8370276722

View File

@ -442,14 +442,19 @@ 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)
if (desc->obj) {
return true;
}
}
if (!JS_GetPropertyDescriptorById(cx, holder, id, 0, desc)) {
return false;
}
if (desc->obj) {
return true;
}
JSObject *wnObject = GetWrappedNativeObjectFromHolder(cx, holder);