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 a=akeybl CALENDAR_1_6_BUILD1 CALENDAR_1_6_RELEASE THUNDERBIRD_14_0b4_BUILD1 THUNDERBIRD_14_0b4_RELEASE
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 03 Jul 2012 17:04:45 -0400
changeset 96217 d1452658046f779ce32da0091607aa1ec80102b1
parent 96216 84241548fe1254262e667cb075a8e57330467514
child 96219 48842c93fcb2869c9185172c172bf9bf13c798e3
child 96221 288d649385f0aadf45cda22b104a6ef9e36098b7
child 96222 60598398e29c1c11f8d888f5a759090a802cd219
child 96226 6ce3b0a5b41e418c048bc192e3e61ca8688336c4
child 96249 47180d63e1403a18d1c5c6e84a3fa098c2bccae8
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersjosh, akeybl
bugs769721
milestone14.0
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 a=akeybl
dom/plugins/base/nsNPAPIPlugin.cpp
--- a/dom/plugins/base/nsNPAPIPlugin.cpp
+++ b/dom/plugins/base/nsNPAPIPlugin.cpp
@@ -307,27 +307,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.