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.
a=chofmann, r=vidur git-svn-id: svn://10.0.0.236/trunk@35748 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user