Bug 1228461 - Don't assert we must have keys for keyIds we've seen in ~ClearKeySession(). r=gerald
authorChris Pearce <cpearce@mozilla.com>
Fri, 27 Nov 2015 17:13:35 +1300
changeset 274411 05c5396b723017816c91a55a23d56d1e974965b5
parent 274410 f04beafaf860912b22022d0b787134646cf9c3f1
child 274412 ec6611006fd01c94ea1c4db8a89ed412d103549a
push id68577
push usercpearce@mozilla.com
push dateFri, 27 Nov 2015 04:14:11 +0000
treeherdermozilla-inbound@ec6611006fd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1228461
milestone45.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 1228461 - Don't assert we must have keys for keyIds we've seen in ~ClearKeySession(). r=gerald
media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
media/gmp-clearkey/0.1/ClearKeySession.cpp
--- a/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeyDecryptionManager.cpp
@@ -117,17 +117,17 @@ ClearKeyDecryptionManager::ExpectKeyId(K
   }
   mDecryptors[aKeyId]->AddRef();
 }
 
 void
 ClearKeyDecryptionManager::ReleaseKeyId(KeyId aKeyId)
 {
   CK_LOGD("ClearKeyDecryptionManager::ReleaseKeyId");
-  assert(HasKeyForKeyId(aKeyId));
+  assert(HasSeenKeyId(aKeyId));
 
   ClearKeyDecryptor* decryptor = mDecryptors[aKeyId];
   if (!decryptor->Release()) {
     mDecryptors.erase(aKeyId);
   }
 }
 
 GMPErr
--- a/media/gmp-clearkey/0.1/ClearKeySession.cpp
+++ b/media/gmp-clearkey/0.1/ClearKeySession.cpp
@@ -37,17 +37,17 @@ ClearKeySession::ClearKeySession(const s
 }
 
 ClearKeySession::~ClearKeySession()
 {
   CK_LOGD("ClearKeySession dtor %p", this);
 
   auto& keyIds = GetKeyIds();
   for (auto it = keyIds.begin(); it != keyIds.end(); it++) {
-    assert(ClearKeyDecryptionManager::Get()->HasKeyForKeyId(*it));
+    assert(ClearKeyDecryptionManager::Get()->HasSeenKeyId(*it));
 
     ClearKeyDecryptionManager::Get()->ReleaseKeyId(*it);
     mCallback->KeyStatusChanged(&mSessionId[0], mSessionId.size(),
                                 &(*it)[0], it->size(),
                                 kGMPUnknown);
   }
 }