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 326303 103bde7296f3cff009fa3dc2873611aa913fc9f7
parent 326302 83e74e1d0cd1a2170412157cc18c654da382f1f0
child 326304 82c2c2940a016c0bc2693a2eca4a66effe739813
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, ritu
bugs1272521
milestone47.0
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
@@ -280,36 +280,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);