From 271f91f42333a9509d908bb516a39166901bebe0 Mon Sep 17 00:00:00 2001 From: "mrbkap@gmail.com" Date: Tue, 4 Dec 2007 16:52:02 -0800 Subject: [PATCH] Backing this out to fix mochitest failures. --- js/src/xpconnect/src/XPCWrapper.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/js/src/xpconnect/src/XPCWrapper.cpp b/js/src/xpconnect/src/XPCWrapper.cpp index d32d0bc8594c..efff4d1bc2c7 100644 --- a/js/src/xpconnect/src/XPCWrapper.cpp +++ b/js/src/xpconnect/src/XPCWrapper.cpp @@ -168,19 +168,9 @@ XPCWrapper::NewResolve(JSContext *cx, JSObject *wrapperObj, JSBool isXOW = (JS_GET_CLASS(cx, wrapperObj) == &sXPC_XOW_JSClass.base); uintN attrs = JSPROP_ENUMERATE; - JSPropertyOp getter = nsnull; - JSPropertyOp setter = nsnull; - if (isXOW && OBJ_IS_NATIVE(innerObjp)) { + if (OBJ_IS_NATIVE(innerObjp)) { JSScopeProperty *sprop = reinterpret_cast(prop); - attrs = sprop->attrs; - if (attrs & JSPROP_GETTER) { - getter = sprop->getter; - } - if (attrs & JSPROP_SETTER) { - setter = sprop->setter; - } - if ((preserveVal || isXOW) && SPROP_HAS_VALID_SLOT(sprop, OBJ_SCOPE(innerObjp))) { v = OBJ_GET_SLOT(cx, innerObjp, sprop->slot); @@ -209,16 +199,8 @@ XPCWrapper::NewResolve(JSContext *cx, JSObject *wrapperObj, return JS_FALSE; } - const uintN interesting_attrs = isXOW - ? (JSPROP_ENUMERATE | - 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); + JSBool ok = OBJ_DEFINE_PROPERTY(cx, wrapperObj, interned_id, v, nsnull, + nsnull, (attrs & JSPROP_ENUMERATE), nsnull); if (ok && (ok = ::JS_SetReservedSlot(cx, wrapperObj, sResolvingSlot, oldSlotVal))) {