Bug 1261752. Part 1. r=mats a=ritu
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 10 May 2016 22:58:26 -0500
changeset 332871 ca2f65b2d7b370d4593c9d321b31a92679e8fe10
parent 332870 64c29da64cb8e9b0e4efde3394d63603f6a4216d
child 332872 30b2b24080072a24703e01054b56091753a415b7
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats, ritu
bugs1261752
milestone48.0a2
Bug 1261752. Part 1. r=mats a=ritu
view/nsViewManager.cpp
--- a/view/nsViewManager.cpp
+++ b/view/nsViewManager.cpp
@@ -426,17 +426,17 @@ nsViewManager::ProcessPendingUpdatesRecu
 }
 
 void
 nsViewManager::ProcessPendingUpdatesPaint(nsIWidget* aWidget)
 {
   if (aWidget->NeedsPaint()) {
     // If an ancestor widget was hidden and then shown, we could
     // have a delayed resize to handle.
-    for (nsViewManager *vm = this; vm;
+    for (RefPtr<nsViewManager> vm = this; vm;
          vm = vm->mRootView->GetParent()
            ? vm->mRootView->GetParent()->GetViewManager()
            : nullptr) {
       if (vm->mDelayedResize != nsSize(NSCOORD_NONE, NSCOORD_NONE) &&
           vm->mRootView->IsEffectivelyVisible() &&
           vm->mPresShell && vm->mPresShell->IsVisible()) {
         vm->FlushDelayedResize(true);
       }