Bug 1242668 - Hold more references. r=sotaro, a=lizzard
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 25 Feb 2016 17:26:10 -0500
changeset 323649 b5043e21ada3bf983b1052b3daf3f5ee47fd9b62
parent 323648 ebe83472332c190ada8ed46e183ff91d41b1da69
child 323650 12c404b3d3e14842ac4ff0a604a9a37df6f013c7
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssotaro, lizzard
bugs1242668
milestone47.0a2
Bug 1242668 - Hold more references. r=sotaro, a=lizzard
dom/ipc/TabChild.cpp
gfx/layers/ipc/CompositorChild.cpp
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -2828,17 +2828,18 @@ TabChild::DidComposite(uint64_t aTransac
                        const TimeStamp& aCompositeStart,
                        const TimeStamp& aCompositeEnd)
 {
   MOZ_ASSERT(mPuppetWidget);
   MOZ_ASSERT(mPuppetWidget->GetLayerManager());
   MOZ_ASSERT(mPuppetWidget->GetLayerManager()->GetBackendType() ==
                LayersBackend::LAYERS_CLIENT);
 
-  ClientLayerManager *manager = mPuppetWidget->GetLayerManager()->AsClientLayerManager();
+  RefPtr<ClientLayerManager> manager =
+    mPuppetWidget->GetLayerManager()->AsClientLayerManager();
 
   manager->DidComposite(aTransactionId, aCompositeStart, aCompositeEnd);
 }
 
 void
 TabChild::DidRequestComposite(const TimeStamp& aCompositeReqStart,
                               const TimeStamp& aCompositeReqEnd)
 {
--- a/gfx/layers/ipc/CompositorChild.cpp
+++ b/gfx/layers/ipc/CompositorChild.cpp
@@ -370,19 +370,20 @@ CompositorChild::RecvHideAllPlugins(cons
 
 bool
 CompositorChild::RecvDidComposite(const uint64_t& aId, const uint64_t& aTransactionId,
                                   const TimeStamp& aCompositeStart,
                                   const TimeStamp& aCompositeEnd)
 {
   if (mLayerManager) {
     MOZ_ASSERT(aId == 0);
-    mLayerManager->DidComposite(aTransactionId, aCompositeStart, aCompositeEnd);
+    RefPtr<ClientLayerManager> m = mLayerManager;
+    m->DidComposite(aTransactionId, aCompositeStart, aCompositeEnd);
   } else if (aId != 0) {
-    dom::TabChild *child = dom::TabChild::GetFrom(aId);
+    RefPtr<dom::TabChild> child = dom::TabChild::GetFrom(aId);
     if (child) {
       child->DidComposite(aTransactionId, aCompositeStart, aCompositeEnd);
     }
   }
   return true;
 }
 
 bool