Ejemplo n.º 1
0
nsSHEntry::~nsSHEntry()
{
  StopTrackingEntry(this);

  // Since we never really remove kids from SHEntrys, we need to null
  // out the mParent pointers on all our kids.
  mChildren.EnumerateForwards(ClearParentPtr, nsnull);
  mChildren.Clear();

  nsCOMPtr<nsIContentViewer> viewer = mContentViewer;
  DropPresentationState();
  if (viewer) {
    viewer->Destroy();
  }

  mEditorData = nsnull;

#ifdef DEBUG
  // This is not happening as far as I can tell from breakpad as of early November 2007
  nsExpirationTracker<nsSHEntry,3>::Iterator iterator(gHistoryTracker);
  nsSHEntry* elem;
  while ((elem = iterator.Next()) != nsnull) {
    NS_ASSERTION(elem != this, "Found dead entry still in the tracker!");
  }
#endif
}
Ejemplo n.º 2
0
nsSHEntry::~nsSHEntry()
{
  StopTrackingEntry(this);

  // Since we never really remove kids from SHEntrys, we need to null
  // out the mParent pointers on all our kids.
  mChildren.EnumerateForwards(ClearParentPtr, nsnull);
  mChildren.Clear();

  if (mContentViewer) {
    // RemoveFromBFCacheSync is virtual, so call the nsSHEntry version
    // explicitly
    nsSHEntry::RemoveFromBFCacheSync();
  }

  mEditorData = nsnull;

#ifdef DEBUG
  // This is not happening as far as I can tell from breakpad as of early November 2007
  nsExpirationTracker<nsSHEntry,3>::Iterator iterator(gHistoryTracker);
  nsSHEntry* elem;
  while ((elem = iterator.Next()) != nsnull) {
    NS_ASSERTION(elem != this, "Found dead entry still in the tracker!");
  }
#endif
}
Ejemplo n.º 3
0
void
nsSHEntry::DropPresentationState()
{
  nsRefPtr<nsSHEntry> kungFuDeathGrip = this;

  if (mDocument) {
    mDocument->SetShellsHidden(PR_FALSE);
    mDocument->RemoveMutationObserver(this);
    mDocument = nsnull;
  }
  if (mContentViewer)
    mContentViewer->ClearHistoryEntry();

  StopTrackingEntry(this);
  mContentViewer = nsnull;
  mSticky = PR_TRUE;
  mWindowState = nsnull;
  mViewerBounds.SetRect(0, 0, 0, 0);
  mChildShells.Clear();
  mRefreshURIList = nsnull;
}