Bug 719501 - Allow JavaScript-navigator-property properties to be null. r=jst

This commit is contained in:
Gregor Wagner 2012-01-22 16:58:30 -08:00
parent 86f6e9f346
commit e3f02f2fc6

View File

@ -6515,7 +6515,7 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
}
}
if (JSVAL_IS_PRIMITIVE(prop_val)) {
if (JSVAL_IS_PRIMITIVE(prop_val) && !JSVAL_IS_NULL(prop_val)) {
JSObject *scope;
if (aWin->IsOuterWindow()) {
@ -7268,7 +7268,7 @@ nsNavigatorSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
NS_ENSURE_SUCCESS(rv, rv);
}
if (JSVAL_IS_PRIMITIVE(prop_val)) {
if (JSVAL_IS_PRIMITIVE(prop_val) && !JSVAL_IS_NULL(prop_val)) {
nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
rv = WrapNative(cx, obj, native, true, &prop_val,
getter_AddRefs(holder));