Backed out changeset 23d5db5795d3 (bug 1049501) for mochitest-3 crashes.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 14 Aug 2014 14:52:22 -0400
changeset 217499 9e3a3a52a062bce344d49c8210604b475ef3c9fc
parent 217498 23d5db5795d337dc5d0f7bda763ef8b9b8617330
child 217500 1d44efa49ca14ecb65960203ca9a36543ef66bf2
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1049501
milestone33.0a2
backs out23d5db5795d337dc5d0f7bda763ef8b9b8617330
Backed out changeset 23d5db5795d3 (bug 1049501) for mochitest-3 crashes. CLOSED TREE
content/media/gmp/GMPVideoEncoderParent.cpp
--- a/content/media/gmp/GMPVideoEncoderParent.cpp
+++ b/content/media/gmp/GMPVideoEncoderParent.cpp
@@ -67,19 +67,17 @@ GMPVideoEncoderParent::GMPVideoEncoderPa
   nsresult rv = NS_NewNamedThread("GMPEncoded", getter_AddRefs(mEncodedThread));
   if (NS_FAILED(rv)) {
     MOZ_CRASH();
   }
 }
 
 GMPVideoEncoderParent::~GMPVideoEncoderParent()
 {
-  if (mEncodedThread) {
-    mEncodedThread->Shutdown();
-  }
+  mEncodedThread->Shutdown();
 }
 
 GMPVideoHostImpl&
 GMPVideoEncoderParent::Host()
 {
   return mVideoHost;
 }
 
@@ -246,22 +244,16 @@ GMPVideoEncoderParent::ActorDestroy(Acto
 {
   LOGD(("%s::%s: %p (%d)", __CLASS__, __FUNCTION__, this, (int) aWhy));
   mIsOpen = false;
   if (mCallback) {
     // May call Close() (and Shutdown()) immediately or with a delay
     mCallback->Terminated();
     mCallback = nullptr;
   }
-  // Must be shut down before VideoEncoderDestroyed(), since this can recurse
-  // the GMPThread event loop.  See bug 1049501
-  if (mEncodedThread) {
-    mEncodedThread->Shutdown();
-    mEncodedThread = nullptr;
-  }
   if (mPlugin) {
     // Ignore any return code. It is OK for this to fail without killing the process.
     mPlugin->VideoEncoderDestroyed(this);
     mPlugin = nullptr;
   }
   mVideoHost.ActorDestroyed();
 }