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 347784 ba8075cd3fb917e38d90669c29c97a683fbf8b21
parent 347783 938357e8d2546003e4dbb7a5158ca75ca48ac757
child 347785 44330fe94f7b84c08273d659b6a77f408338c9eb
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn, lizzard
bugs1293985
milestone50.0a2
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
@@ -3674,16 +3674,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)