Commit cfa25ee4 authored by Ehsan Akhgari's avatar Ehsan Akhgari
Browse files

Bug 581536 - Part 3: Disconnect the transaction manager from the pres context...

Bug 581536 - Part 3: Disconnect the transaction manager from the pres context as soon as it's disconnected from the pres shell; r=dbaron a=blocking-betaN+

This patch ensures that if for some reason, the pres context for a pres shell
goes away, we do not hold on to the old transaction manager.  Doing so would
lead into the transition properties not being deleted from the elements, which
will later on confuse the new transaction manager if we ever create one.

--HG--
extra : rebase_source : 11cbd972b81be1fa772eb865b2793d55711eec88
parent 986f49d4
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -258,10 +258,6 @@ nsPresContext::~nsPresContext()
  NS_PRECONDITION(!mShell, "Presshell forgot to clear our mShell pointer");
  SetShell(nsnull);

  if (mTransitionManager) {
    mTransitionManager->Disconnect();
  }

  // Disconnect the refresh driver *after* the transition manager, which
  // needs it.
  if (mRefreshDriver && mRefreshDriver->PresContext() == this) {
@@ -1047,6 +1043,11 @@ nsPresContext::SetShell(nsIPresShell* aShell)
      mImageLoaders[i].Enumerate(destroy_loads, nsnull);
      mImageLoaders[i].Clear();
    }

    if (mTransitionManager) {
      mTransitionManager->Disconnect();
      mTransitionManager = nsnull;
    }
  }
}