Bug 603417 - Disable oopp for java on windows. r=bsmedberg, josh, a=final.

This commit is contained in:
Jim Mathies 2010-10-15 11:04:39 -05:00
parent 8b53f409de
commit c6d72f81ef
2 changed files with 20 additions and 2 deletions

View File

@ -1320,6 +1320,12 @@ pref("dom.ipc.plugins.timeoutSecs", 0);
pref("dom.ipc.plugins.processLaunchTimeoutSecs", 0);
#endif
#ifdef XP_WIN
// Disable oopp for java on windows. They run their own
// process isolation which conflicts with our implementation.
pref("dom.ipc.plugins.java.enabled", false);
#endif
#ifndef ANDROID
#ifndef XP_MACOSX
#ifdef XP_UNIX

View File

@ -316,6 +316,10 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
return PR_FALSE;
}
if (!aPluginTag) {
return PR_FALSE;
}
#ifdef XP_MACOSX
// Only allow on Mac OS X 10.6 or higher.
if (OSXVersion() < 0x00001060) {
@ -324,8 +328,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
// Blacklist Flash 10.0 or lower since it may try to negotiate Carbon/Quickdraw
// which are not supported out of process. Also blacklist Flash 10.1 if this
// machine has an Intel GMA9XX GPU because Flash will negotiate Quickdraw graphics.
if (aPluginTag &&
aPluginTag->mFileName.EqualsIgnoreCase("flash player.plugin")) {
if (aPluginTag->mFileName.EqualsIgnoreCase("flash player.plugin")) {
// If the first '.' is before position 2 or the version
// starts with 10.0 then we are dealing with Flash 10 or less.
if (aPluginTag->mVersion.FindChar('.') < 2) {
@ -385,6 +388,15 @@ nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
nsCAutoString prefGroupKey("dom.ipc.plugins.enabled.");
#endif
// Java plugins include a number of different file names,
// so use the mime type (mIsJavaPlugin) and a special pref.
PRBool javaIsEnabled;
if (aPluginTag->mIsJavaPlugin &&
NS_SUCCEEDED(prefs->GetBoolPref("dom.ipc.plugins.java.enabled", &javaIsEnabled)) &&
!javaIsEnabled) {
return PR_FALSE;
}
PRUint32 prefCount;
char** prefNames;
nsresult rv = prefs->GetChildList(prefGroupKey.get(),