Bug 1130932 - allow GMPDecryptorParent::RecvKeyStatusChanged calls after Close(). r=edwin. a=lmandel
authorJW Wang <jwwang@mozilla.com>
Mon, 09 Feb 2015 07:32:59 +0800
changeset 250210 5ee41a13b1ee
parent 250209 acb510bddadd
child 250211 b2add82a76ce
push id4521
push usercpearce@mozilla.com
push date2015-03-04 01:22 +0000
treeherdermozilla-beta@8abdbdecd2d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin, lmandel
bugs1130932
milestone37.0
Bug 1130932 - allow GMPDecryptorParent::RecvKeyStatusChanged calls after Close(). r=edwin. a=lmandel
dom/media/gmp/GMPDecryptorParent.cpp
--- a/dom/media/gmp/GMPDecryptorParent.cpp
+++ b/dom/media/gmp/GMPDecryptorParent.cpp
@@ -264,21 +264,19 @@ GMPDecryptorParent::RecvSessionError(con
   return true;
 }
 
 bool
 GMPDecryptorParent::RecvKeyStatusChanged(const nsCString& aSessionId,
                                          const nsTArray<uint8_t>& aKeyId,
                                          const GMPMediaKeyStatus& aStatus)
 {
-  if (!mIsOpen) {
-    NS_WARNING("Trying to use a dead GMP decrypter!");
-    return false;
+  if (mIsOpen) {
+    mCallback->KeyStatusChanged(aSessionId, aKeyId, aStatus);
   }
-  mCallback->KeyStatusChanged(aSessionId, aKeyId, aStatus);
   return true;
 }
 
 bool
 GMPDecryptorParent::RecvSetCaps(const uint64_t& aCaps)
 {
   if (!mIsOpen) {
     NS_WARNING("Trying to use a dead GMP decrypter!");