Bug 1293985 part 1 - Hold a strong ref on aDocument. r=tn a=lizzard
authorMats Palmgren <mats@mozilla.com>
Fri, 19 Aug 2016 19:56:20 +0200
changeset 342411 7f2fa6e2e0bb1b47a9897ce191a0684adf18d0ac
parent 342410 1014491000f8a3c4cdc43f9e7afd7b510337f9e7
child 342412 e454d5a9aa40c7a9ec8d3c8459592e349406a275
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn, lizzard
bugs1293985
milestone49.0
Bug 1293985 part 1 - Hold a strong ref on aDocument. r=tn a=lizzard
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -3645,16 +3645,17 @@ PresShell::ScheduleViewManagerFlush(Pain
   }
 }
 
 bool
 FlushLayoutRecursive(nsIDocument* aDocument,
                      void* aData = nullptr)
 {
   MOZ_ASSERT(!aData);
+  nsCOMPtr<nsIDocument> kungFuDeathGrip(aDocument);
   aDocument->EnumerateSubDocuments(FlushLayoutRecursive, nullptr);
   aDocument->FlushPendingNotifications(Flush_Layout);
   return true;
 }
 
 void
 PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
                                   bool aFlushOnHoverChange)