Backed out changeset 8559d0b32326 (bug 1309299) for causing a wpt test to fail a=backout CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Tue, 11 Oct 2016 16:49:55 -0700
changeset 348434 fac9c1da5d81a2d0f7ff8fb721ddebc2fbb16b61
parent 348433 daa573228c276fcabf806766e0ae4d736f86b089
child 348435 18255363130ed9dc207ce493b6eaf799156f3211
push id13
push userfmarier@mozilla.com
push dateFri, 11 Nov 2016 01:36:56 +0000
reviewersbackout
bugs1309299
milestone52.0a1
backs out8559d0b323266d6f4b1acd80b124eac03cc88c9c
Backed out changeset 8559d0b32326 (bug 1309299) for causing a wpt test to fail a=backout CLOSED TREE
dom/media/eme/MediaKeySystemAccessManager.cpp
--- a/dom/media/eme/MediaKeySystemAccessManager.cpp
+++ b/dom/media/eme/MediaKeySystemAccessManager.cpp
@@ -60,16 +60,21 @@ MediaKeySystemAccessManager::~MediaKeySy
   Shutdown();
 }
 
 void
 MediaKeySystemAccessManager::Request(DetailedPromise* aPromise,
                                      const nsAString& aKeySystem,
                                      const Sequence<MediaKeySystemConfiguration>& aConfigs)
 {
+  if (aKeySystem.IsEmpty() || aConfigs.IsEmpty()) {
+    aPromise->MaybeReject(NS_ERROR_DOM_INVALID_ACCESS_ERR,
+                          NS_LITERAL_CSTRING("Invalid keysystem type or invalid options sequence"));
+    return;
+  }
   Request(aPromise, aKeySystem, aConfigs, RequestType::Initial);
 }
 
 void
 MediaKeySystemAccessManager::Request(DetailedPromise* aPromise,
                                      const nsAString& aKeySystem,
                                      const Sequence<MediaKeySystemConfiguration>& aConfigs,
                                      RequestType aType)