bug #5352: navigator.javaEnabled() now returns false if the "security.enable_java" preference is undefined, which it is if the "Advanced" preferences dialog has never been run, or you're running under viewer.

This commit is contained in:
beard%netscape.com 1999-06-16 23:40:41 +00:00
parent 78b68b1878
commit 6605e55ca3

View File

@ -2710,19 +2710,9 @@ NavigatorImpl::JavaEnabled(PRBool* aReturn)
return rv;
}
rv = prefs->GetBoolPref("security.enable_java", aReturn);
#if 0
nsIJVMManager* manager = NULL;
rv = nsServiceManager::GetService(nsIJVMManager::GetCID(),
nsIJVMManager::GetIID(),
(nsISupports **)&manager);
if (rv == NS_OK && manager != NULL) {
rv = manager->IsJavaEnabled(aReturn);
nsServiceManager::ReleaseService(nsIJVMManager::GetCID(), manager);
}
#endif
// if pref doesn't exist, map result to false.
if (prefs->GetBoolPref("security.enable_java", aReturn) != NS_OK)
*aReturn = PR_FALSE;
return rv;
}