Backing this out to fix mochitest failures.

This commit is contained in:
mrbkap@gmail.com 2007-12-04 16:52:02 -08:00
Родитель ac91e7b605
Коммит 271f91f423
1 изменённых файлов: 3 добавлений и 21 удалений

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

@ -168,19 +168,9 @@ XPCWrapper::NewResolve(JSContext *cx, JSObject *wrapperObj,
JSBool isXOW = (JS_GET_CLASS(cx, wrapperObj) == &sXPC_XOW_JSClass.base); JSBool isXOW = (JS_GET_CLASS(cx, wrapperObj) == &sXPC_XOW_JSClass.base);
uintN attrs = JSPROP_ENUMERATE; uintN attrs = JSPROP_ENUMERATE;
JSPropertyOp getter = nsnull; if (OBJ_IS_NATIVE(innerObjp)) {
JSPropertyOp setter = nsnull;
if (isXOW && OBJ_IS_NATIVE(innerObjp)) {
JSScopeProperty *sprop = reinterpret_cast<JSScopeProperty *>(prop); JSScopeProperty *sprop = reinterpret_cast<JSScopeProperty *>(prop);
attrs = sprop->attrs; attrs = sprop->attrs;
if (attrs & JSPROP_GETTER) {
getter = sprop->getter;
}
if (attrs & JSPROP_SETTER) {
setter = sprop->setter;
}
if ((preserveVal || isXOW) && if ((preserveVal || isXOW) &&
SPROP_HAS_VALID_SLOT(sprop, OBJ_SCOPE(innerObjp))) { SPROP_HAS_VALID_SLOT(sprop, OBJ_SCOPE(innerObjp))) {
v = OBJ_GET_SLOT(cx, innerObjp, sprop->slot); v = OBJ_GET_SLOT(cx, innerObjp, sprop->slot);
@ -209,16 +199,8 @@ XPCWrapper::NewResolve(JSContext *cx, JSObject *wrapperObj,
return JS_FALSE; return JS_FALSE;
} }
const uintN interesting_attrs = isXOW JSBool ok = OBJ_DEFINE_PROPERTY(cx, wrapperObj, interned_id, v, nsnull,
? (JSPROP_ENUMERATE | nsnull, (attrs & JSPROP_ENUMERATE), nsnull);
JSPROP_READONLY |
JSPROP_PERMANENT |
JSPROP_SHARED |
JSPROP_GETTER |
JSPROP_SETTER)
: JSPROP_ENUMERATE;
JSBool ok = OBJ_DEFINE_PROPERTY(cx, wrapperObj, interned_id, v, getter,
setter, (attrs & interesting_attrs), nsnull);
if (ok && (ok = ::JS_SetReservedSlot(cx, wrapperObj, sResolvingSlot, if (ok && (ok = ::JS_SetReservedSlot(cx, wrapperObj, sResolvingSlot,
oldSlotVal))) { oldSlotVal))) {