Bug 628612: make window constructor properties configurable so Facebook works, r=cam,jeff, a=blocker
authorDavid Mandelin <dmandelin@mozilla.com>
Tue, 25 Jan 2011 17:49:10 -0800
changeset 61438 3489b017fd2a9f7766fb5b3f075ca1287dad5cdc
parent 61437 4bc54aa1e5660099bae879c1e6bf6c8c1e938d47
child 61439 4003aacbc67503b2c6b7677f6e1edcbe8303f650
push idunknown
push userunknown
push dateunknown
reviewerscam, jeff, blocker
bugs628612
milestone2.0b10pre
Bug 628612: make window constructor properties configurable so Facebook works, r=cam,jeff, a=blocker
dom/base/nsDOMClassInfo.cpp
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -5761,21 +5761,22 @@ public:
                      jsval *vp, PRBool *_retval);
 
   nsresult HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                        JSObject *obj, const jsval &val, PRBool *bp,
                        PRBool *_retval);
 
   nsresult Install(JSContext *cx, JSObject *target, jsval thisAsVal)
   {
+    // The 'attrs' argument used to be JSPROP_PERMANENT. See bug 628612.
     JSBool ok = JS_WrapValue(cx, &thisAsVal) &&
       ::JS_DefineUCProperty(cx, target,
                             reinterpret_cast<const jschar *>(mClassName),
                             nsCRT::strlen(mClassName), thisAsVal, nsnull,
-                            nsnull, JSPROP_PERMANENT);
+                            nsnull, 0);
 
     return ok ? NS_OK : NS_ERROR_UNEXPECTED;
   }
 
 private:
   const nsGlobalNameStruct *GetNameStruct()
   {
     if (!mClassName) {