Bug 1138771 - Ensure we don't deref a null pointer in assertion in GMPVideoDecoderParent::Shutdown(). r=edwin
authorChris Pearce <cpearce@mozilla.com>
Wed, 04 Mar 2015 23:20:45 +1300
changeset 231849 eec321940021145bfa9f51f39bfb077fef498cb4
parent 231848 9447230463a5ccde24240617ff9fc5443394a267
child 231850 f42cf3d85fab2cd2766b4b772700a874035d2e70
push id28362
push userryanvm@gmail.com
push dateWed, 04 Mar 2015 21:35:51 +0000
treeherdermozilla-central@56492f7244a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwin
bugs1138771
milestone39.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 1138771 - Ensure we don't deref a null pointer in assertion in GMPVideoDecoderParent::Shutdown(). r=edwin
dom/media/gmp/GMPVideoDecoderParent.cpp
--- a/dom/media/gmp/GMPVideoDecoderParent.cpp
+++ b/dom/media/gmp/GMPVideoDecoderParent.cpp
@@ -182,17 +182,17 @@ GMPVideoDecoderParent::Drain()
   return NS_OK;
 }
 
 // Note: Consider keeping ActorDestroy sync'd up when making changes here.
 nsresult
 GMPVideoDecoderParent::Shutdown()
 {
   LOGD(("%s: %p", __FUNCTION__, this));
-  MOZ_ASSERT(mPlugin->GMPThread() == NS_GetCurrentThread());
+  MOZ_ASSERT(!mPlugin || mPlugin->GMPThread() == NS_GetCurrentThread());
 
   if (mShuttingDown) {
     return NS_OK;
   }
   mShuttingDown = true;
 
   // Notify client we're gone!  Won't occur after Close()
   if (mCallback) {