Bug 799165 - Don't revoke a view manager flush on PresShell destruction if we don't own the refresh driver. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 09 Nov 2012 19:21:45 +1300
changeset 112788 f0ca8ef31bef6a53718c9b8f047de6d5e60d8916
parent 112787 bc8bbf49b63acf5b1aa69a6dc8b299f88bb5d9eb
child 112789 1c1fa8af5978ed6bf0b038839750228a63d40a70
push id23838
push usereakhgari@mozilla.com
push dateFri, 09 Nov 2012 15:21:51 +0000
treeherdermozilla-central@c39596b46863 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs799165
milestone19.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 799165 - Don't revoke a view manager flush on PresShell destruction if we don't own the refresh driver. r=roc
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -1057,17 +1057,19 @@ PresShell::Destroy()
   // Revoke any pending events.  We need to do this and cancel pending reflows
   // before we destroy the frame manager, since apparently frame destruction
   // sometimes spins the event queue when plug-ins are involved(!).
   rd->RemoveLayoutFlushObserver(this);
   if (mHiddenInvalidationObserverRefreshDriver) {
     mHiddenInvalidationObserverRefreshDriver->RemovePresShellToInvalidateIfHidden(this);
   }
 
-  rd->RevokeViewManagerFlush();
+  if (rd->PresContext() == GetPresContext()) {
+    rd->RevokeViewManagerFlush();
+  }
 
   mResizeEvent.Revoke();
   if (mAsyncResizeTimerIsActive) {
     mAsyncResizeEventTimer->Cancel();
     mAsyncResizeTimerIsActive = false;
   }
 
   CancelAllPendingReflows();