Bug 298202 - java preference ignored depending on java plugin location when javascript calls into Java directly. r=jst sr=shaver

This commit is contained in:
doronr%us.ibm.com 2005-08-22 14:07:32 +00:00
Родитель 6c33012cae
Коммит 49c6f4f617
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -374,8 +374,14 @@ nsJVMManager::nsJVMManager(nsISupports* outer)
NS_INIT_AGGREGATED(outer); NS_INIT_AGGREGATED(outer);
nsCOMPtr<nsIPrefBranch2> branch = do_GetService(NS_PREFSERVICE_CONTRACTID); nsCOMPtr<nsIPrefBranch2> branch = do_GetService(NS_PREFSERVICE_CONTRACTID);
if (branch) if (branch) {
branch->AddObserver("security.enable_java", this, PR_FALSE); branch->AddObserver("security.enable_java", this, PR_FALSE);
PRBool prefBool = PR_TRUE;
nsresult rv = branch->GetBoolPref("security.enable_java", &prefBool);
if (NS_SUCCEEDED(rv)) {
SetJVMEnabled(prefBool);
}
}
} }
nsJVMManager::~nsJVMManager() nsJVMManager::~nsJVMManager()