Bug 1130932 - allow GMPDecryptorParent::RecvKeyStatusChanged calls after Close(). r=edwin.
authorJW Wang <jwwang@mozilla.com>
Mon, 09 Feb 2015 07:32:59 +0800
changeset 255717 3f2ea7b6061f7dc30fddf37ec982b12d37b11c05
parent 255716 6395adc26b8e7527f9c94a5688ebe8fcd77fd4cf
child 255718 0ebc9ae84e41d2eb6d21f0670a433605ac017dce
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1130932
milestone38.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 1130932 - allow GMPDecryptorParent::RecvKeyStatusChanged calls after Close(). r=edwin.
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,
                                          InfallibleTArray<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!");