Bug 288386. Java applet + screen reader: heap corruption brings down Firefox, depending on the JRE build. Temporary solution to turn off Java applet support when screen reader is present. This bandaid is okay for now, because Java applets are still not supported by any screen readers that currently support Gecko. r=kyle, sr=jst

This commit is contained in:
aaronleventhal%moonset.net 2005-04-02 00:57:08 +00:00
Родитель ed7af28d0d
Коммит 7071f3f190
1 изменённых файлов: 20 добавлений и 2 удалений

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

@ -538,6 +538,26 @@ void nsAccessNodeWrap::InitAccessibility()
nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefBranch) {
prefBranch->GetBoolPref("accessibility.disableenumvariant", &gIsEnumVariantSupportDisabled);
PRBool isJavaEnabled;
prefBranch->GetBoolPref("security.enable_java", &isJavaEnabled);
if (isJavaEnabled) {
// Java is enabled
PRBool isJavaEnabledByUser;
prefBranch->PrefHasUserValue("security.enable_java", &isJavaEnabledByUser);
if (!isJavaEnabledByUser) {
// Java is enabled by default, not explicitly by the user
PRBool isScreenReaderActive;
if (SUCCEEDED(SystemParametersInfo(SPI_GETSCREENREADER, 0, &isScreenReaderActive, 0)) &&
isScreenReaderActive) {
// A screen reader is running, so let's turn off the default
// Java support to save ourselves from heap corruption.
// XXX only a temporary work around to this issue. It seems to be specific JRE
// builds that have the problem
prefBranch->SetBoolPref("security.enable_java", PR_FALSE);
}
}
}
}
if (!gmUserLib) {
@ -562,5 +582,3 @@ void nsAccessNodeWrap::ShutdownAccessibility()
nsAccessNode::ShutdownXPAccessibility();
}