Bug 1336510 - Part 3: Capture a strong reference to this in CompositorBridgeParent::FlushApzRepaints, r=botond, a=abillings
authorMichael Layzell <michael@thelayzells.com>
Fri, 03 Feb 2017 16:56:24 -0500
changeset 378754 967eaaba3f9aeea2c6f8cfb507cd08c1d1266ea2
parent 378753 38d32d83202ead3d878468ed2f673ad648b2c36d
child 378755 a456047191928d290a5b59b3002b931bcff081ca
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, abillings
bugs1336510
milestone53.0a2
Bug 1336510 - Part 3: Capture a strong reference to this in CompositorBridgeParent::FlushApzRepaints, r=botond, a=abillings MozReview-Commit-ID: KdGBYEAC0dW
gfx/layers/ipc/CompositorBridgeParent.cpp
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1287,18 +1287,19 @@ CompositorBridgeParent::FlushApzRepaints
 {
   MOZ_ASSERT(mApzcTreeManager);
   uint64_t layersId = aLayerTree->GetId();
   if (layersId == 0) {
     // The request is coming from the parent-process layer tree, so we should
     // use the compositor's root layer tree id.
     layersId = mRootLayerTreeID;
   }
+  RefPtr<CompositorBridgeParent> self = this;
   APZThreadUtils::RunOnControllerThread(NS_NewRunnableFunction([=] () {
-    mApzcTreeManager->FlushApzRepaints(layersId);
+    self->mApzcTreeManager->FlushApzRepaints(layersId);
   }));
 }
 
 void
 CompositorBridgeParent::GetAPZTestData(const LayerTransactionParent* aLayerTree,
                                        APZTestData* aOutData)
 {
   MonitorAutoLock lock(*sIndirectLayerTreesLock);