mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
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:
parent
78b68b1878
commit
6605e55ca3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user