Bug 628612: make window constructor properties configurable so Facebook works, r=cam,jeff, a=blocker

This commit is contained in:
David Mandelin 2011-01-25 17:49:10 -08:00
parent e7ce40632d
commit 933116f635

View File

@ -5766,11 +5766,12 @@ public:
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;
}