Bug 1336510 - Part 3: Capture a strong reference to this in CompositorBridgeParent::FlushApzRepaints, r=kats
☠☠ backed out by 3fee518242f6 ☠ ☠
authorMichael Layzell <michael@thelayzells.com>
Fri, 03 Feb 2017 16:56:24 -0500
changeset 344614 e842cdaaa7e5fb44c713917005b19feed9cf5b6e
parent 344613 bd943b368ff7bce820d381fde4991b9bfb2168ca
child 344615 57476b9f342d8872813e701261fad2907738c969
push id31414
push usercbook@mozilla.com
push dateFri, 24 Feb 2017 10:47:41 +0000
treeherdermozilla-central@be661bae6cb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1336510
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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);