Fix bug 541530. r=jst sr=brendan

This commit is contained in:
Blake Kaplan 2010-03-04 13:44:42 -08:00
parent 6598acf4f4
commit 20a75bea4c

View File

@ -584,7 +584,8 @@ static nsDOMClassInfoData sClassInfoData[] = {
WINDOW_SCRIPTABLE_FLAGS)
NS_DEFINE_CLASSINFO_DATA(Location, nsLocationSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS)
(DOM_DEFAULT_SCRIPTABLE_FLAGS &
~nsIXPCScriptable::ALLOW_PROP_MODS_TO_PROTOTYPE))
NS_DEFINE_CLASSINFO_DATA(Navigator, nsNavigatorSH,
DOM_DEFAULT_SCRIPTABLE_FLAGS |
@ -6538,7 +6539,10 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
JSBool ok = ::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
::JS_GetStringLength(str), v, nsnull,
nsnull, JSPROP_ENUMERATE);
nsnull,
JSPROP_PERMANENT |
JSPROP_READONLY |
JSPROP_ENUMERATE);
if (!ok) {
return NS_ERROR_FAILURE;
@ -8155,7 +8159,10 @@ nsDocumentSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
JSString *str = JSVAL_TO_STRING(id);
JSBool ok = ::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
::JS_GetStringLength(str), v, nsnull,
nsnull, JSPROP_ENUMERATE);
nsnull,
JSPROP_PERMANENT |
JSPROP_READONLY |
JSPROP_ENUMERATE);
if (!ok) {
return NS_ERROR_FAILURE;