Bug 536303 - OOPP: disable oopp for Windows 2000. r=benjamin.
authorJim Mathies <jmathies@mozilla.com>
Sun, 10 Jan 2010 17:50:36 -0600
changeset 36981 e37603601684
parent 36980 6c1cd8a81f95
child 36982 f5fca857c581
push id11102
push userjmathies@mozilla.com
push date2010-01-10 23:50 +0000
treeherdermozilla-central@e37603601684 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbenjamin
bugs536303
milestone1.9.3a1pre
Bug 536303 - OOPP: disable oopp for Windows 2000. r=benjamin.
modules/plugin/base/src/nsNPAPIPlugin.cpp
--- a/modules/plugin/base/src/nsNPAPIPlugin.cpp
+++ b/modules/plugin/base/src/nsNPAPIPlugin.cpp
@@ -327,16 +327,26 @@ OOPPluginsEnabled()
 
   PRBool oopPluginsEnabled = PR_FALSE;
   prefs->GetBoolPref("dom.ipc.plugins.enabled", &oopPluginsEnabled);
 
   if (!oopPluginsEnabled) {
     return PR_FALSE;
   }
 
+#ifdef XP_WIN
+  OSVERSIONINFO osVerInfo = {0};
+  osVerInfo.dwOSVersionInfoSize = sizeof(osVerInfo);
+  GetVersionEx(&osVerInfo);
+  // Always disabled on 2K or less. (bug 536303)
+  if (osVerInfo.dwMajorVersion < 5 ||
+      (osVerInfo.dwMajorVersion == 5 && osVerInfo.dwMinorVersion == 0))
+    return PR_FALSE;
+#endif
+
   return PR_TRUE;
 }
 
 #endif // MOZ_IPC
 
 inline PluginLibrary*
 GetNewPluginLibrary(const char* aFilePath,
                     PRLibrary* aLibrary)