Bug 1258079 - hold a ref to the GraphDriver during initialization. r=padenot, a=sylvestre
authorRandell Jesup <rjesup@jesup.org>
Tue, 07 Jun 2016 16:26:20 -0400
changeset 339694 b06db145ff6f8960f4a0a21f88bcdf1a431d4c37
parent 339693 75ff1ecbcb094e2887ad3486fd2e40e33fe01b4c
child 339695 afcdd85399636b518887cc17aedbda8cc1c1f197
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot, sylvestre
bugs1258079
milestone49.0a2
Bug 1258079 - hold a ref to the GraphDriver during initialization. r=padenot, a=sylvestre
dom/media/GraphDriver.cpp
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -225,17 +225,17 @@ public:
                  mDriver->mGraphImpl->mForceShutDown, "Don't start a graph without messages queued.");
       mDriver->mGraphImpl->SwapMessageQueues();
     }
 
     mDriver->RunThread();
     return NS_OK;
   }
 private:
-  ThreadedDriver* mDriver;
+  RefPtr<ThreadedDriver> mDriver;
 };
 
 void
 ThreadedDriver::Start()
 {
   LIFECYCLE_LOG("Starting thread for a SystemClockDriver  %p\n", mGraphImpl);
   Unused << NS_WARN_IF(mThread);
   if (!mThread) { // Ensure we haven't already started it