Bug 1336510 - Part 3: Capture a strong reference to this in CompositorBridgeParent::FlushApzRepaints, r=kats
authorMichael Layzell <michael@thelayzells.com>
Fri, 03 Feb 2017 16:56:24 -0500
changeset 373839 2b47a14041f5c66986083055d780c45bdf238cae
parent 373838 57c46960a5f3bf1be5e34b27a8214b8f500288f2
child 373840 9730f8b599688b259eb1e250b3ef8c073bde76ff
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1336510
milestone54.0a1
Bug 1336510 - Part 3: Capture a strong reference to this in CompositorBridgeParent::FlushApzRepaints, r=kats MozReview-Commit-ID: KdGBYEAC0dW
gfx/layers/ipc/CompositorBridgeParent.cpp
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1311,18 +1311,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);