Bug 769721 - Minimal patch to force OOPP mode on for Windows Vista+ users, because Flash is not tested with the IPP configuration and has known bugs, r=josh
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 03 Jul 2012 17:04:45 -0400
changeset 98172 b39f4007be5a1893bb1d96baed2db842ff766e0d
parent 98171 47f814827db64da0d5a010279d64f5dd57ff312b
child 98214 477d807660d7093abdebdb91ffd360eb7567b987
child 98275 41aaaf01140669813e33e0a7fc3187bafff6637c
push id23035
push userbsmedberg@mozilla.com
push dateTue, 03 Jul 2012 21:06:21 +0000
treeherdermozilla-central@b39f4007be5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs769721
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 769721 - Minimal patch to force OOPP mode on for Windows Vista+ users, because Flash is not tested with the IPP configuration and has known bugs, r=josh
dom/plugins/base/nsNPAPIPlugin.cpp
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -276,27 +276,49 @@ static bool GMA9XXGraphics()
       }
     }
     ::CGLDestroyRendererInfo(renderer);
   }
   return hasIntelGMA9XX;
 }
 #endif
 
+#ifdef XP_WIN
+static bool
+IsVistaOrLater()
+{
+  OSVERSIONINFO info;
+
+  ZeroMemory(&info, sizeof(OSVERSIONINFO));
+  info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+  GetVersionEx(&info);
+
+  return info.dwMajorVersion >= 6;
+}
+#endif
+
 bool
 nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
 {
   if (PR_GetEnv("MOZ_DISABLE_OOP_PLUGINS")) {
     return false;
   }
 
   if (!aPluginTag) {
     return false;
   }
 
+#ifdef XP_WIN
+  // On Windows Vista+, we force Flash to run in OOPP mode because Adobe
+  // doesn't test Flash in-process and there are known stability bugs.
+  if (aPluginTag->mIsFlashPlugin && IsVistaOrLater()) {
+    return true;
+  }
+#endif
+
 #if defined(XP_MACOSX) && defined(__i386__)
   // Only allow on Mac OS X 10.6 or higher.
   if (OSXVersion() < 0x00001060) {
     return false;
   }
   // 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.