Bug 1331548 - Part 3: Make sure the last transaction is revoked when resetting content layer managers. r=mattwoodrow, a=lizzard
authorDavid Anderson <danderson@mozilla.com>
Wed, 01 Feb 2017 23:52:48 -0800
changeset 379384 201b2741fd21fa1bbd29e41020785ac086c844ea
parent 379383 4e05d4f5993973e414520e0421580e1d375bb549
child 379385 c2e1c7de2229b7ad1dfa1da6f5c54a5c104e0c2a
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)
reviewersmattwoodrow, lizzard
bugs1331548
milestone53.0
Bug 1331548 - Part 3: Make sure the last transaction is revoked when resetting content layer managers. r=mattwoodrow, a=lizzard
widget/PuppetWidget.cpp
--- a/widget/PuppetWidget.cpp
+++ b/widget/PuppetWidget.cpp
@@ -595,16 +595,20 @@ PuppetWidget::GetLayerManager(PLayerTran
     lf->SetShadowManager(aShadowManager);
   }
   return mLayerManager;
 }
 
 LayerManager*
 PuppetWidget::RecreateLayerManager(PLayerTransactionChild* aShadowManager)
 {
+  // Force the old LM to self destruct, otherwise if the reference dangles we
+  // could fail to revoke the most recent transaction.
+  DestroyLayerManager();
+
   mLayerManager = new ClientLayerManager(this);
   if (ShadowLayerForwarder* lf = mLayerManager->AsShadowForwarder()) {
     lf->SetShadowManager(aShadowManager);
   }
   return mLayerManager;
 }
 
 nsresult