Bug 1272521 - Reject Widevine keysystem requests on MacOSX 10.6. r=gerald a=ritu
authorChris Pearce <cpearce@mozilla.com>
Fri, 13 May 2016 14:00:29 +1200
changeset 332893 9e49e1b06115a91c47b0184e535774deec4453a9
parent 332892 fd43bc66da8a9184f9aa7b8814393dec9b9e3be2
child 332894 17724486e1591858eea09dc327475a25883854a4
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, ritu
bugs1272521
milestone48.0a2
Bug 1272521 - Reject Widevine keysystem requests on MacOSX 10.6. r=gerald a=ritu The Widevine CDM is crashing trying to determine the screen layout, and since 10.6 is being deprecated in August, we're not going to bother making it work. MozReview-Commit-ID: K1k1WZqjoyy
dom/media/eme/MediaKeySystemAccess.cpp
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -281,36 +281,42 @@ MediaKeySystemAccess::GetKeySystemStatus
   if (aKeySystem.EqualsLiteral("com.adobe.primetime")) {
     if (!Preferences::GetBool("media.gmp-eme-adobe.enabled", false)) {
       aOutMessage = NS_LITERAL_CSTRING("Adobe EME disabled");
       return MediaKeySystemStatus::Cdm_disabled;
     }
 #ifdef XP_WIN
     // Win Vista and later only.
     if (!IsVistaOrLater()) {
-      aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version not met for Adobe EME");
+      aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Adobe EME");
       return MediaKeySystemStatus::Cdm_not_supported;
     }
 #endif
 #ifdef XP_MACOSX
     if (!nsCocoaFeatures::OnLionOrLater()) {
-      aOutMessage = NS_LITERAL_CSTRING("Minimum MacOSX version not met for Adobe EME");
+      aOutMessage = NS_LITERAL_CSTRING("Minimum MacOSX version (10.7) not met for Adobe EME");
       return MediaKeySystemStatus::Cdm_not_supported;
     }
 #endif
     return EnsureMinCDMVersion(mps, aKeySystem, aMinCdmVersion, aOutMessage, aOutCdmVersion);
   }
 #endif
 
 #ifdef MOZ_WIDEVINE_EME
   if (aKeySystem.EqualsLiteral("com.widevine.alpha")) {
 #ifdef XP_WIN
     // Win Vista and later only.
     if (!IsVistaOrLater()) {
-      aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version not met for Widevine EME");
+      aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Widevine EME");
+      return MediaKeySystemStatus::Cdm_not_supported;
+    }
+#endif
+#ifdef XP_MACOSX
+    if (!nsCocoaFeatures::OnLionOrLater()) {
+      aOutMessage = NS_LITERAL_CSTRING("Minimum MacOSX version (10.7) not met for Widevine EME");
       return MediaKeySystemStatus::Cdm_not_supported;
     }
 #endif
     if (!Preferences::GetBool("media.gmp-widevinecdm.enabled", false)) {
       aOutMessage = NS_LITERAL_CSTRING("Widevine EME disabled");
       return MediaKeySystemStatus::Cdm_disabled;
     }
     return EnsureMinCDMVersion(mps, aKeySystem, aMinCdmVersion, aOutMessage, aOutCdmVersion);