if (!aViewer) {  mPreviousViewer = nsnull;
DocumentViewerImpl::SetPreviousViewer(nsIContentViewer* aViewer){  // NOTE:  |Show| sets |mPreviousViewer| to null without calling this  // function.  if (aViewer) {    NS_ASSERTION(!mPreviousViewer,                 "can't set previous viewer when there already is one");    // In a multiple chaining situation (which occurs when running a thrashing    // test like i-bench or jrgm's tests with no delay), we can build up a     // whole chain of viewers.  In order to avoid this, we always set our previous    // viewer to the MOST previous viewer in the chain, and then dump the intermediate    // link from the chain.  This ensures that at most only 2 documents are alive    // and undestroyed at any given time (the one that is showing and the one that    // is loading with painting suppressed).    aViewer->Validate();    nsCOMPtr<nsIContentViewer> prevViewer;    aViewer->GetPreviousViewer(getter_AddRefs(prevViewer));    if (prevViewer) {      aViewer->SetPreviousViewer(nsnull);      aViewer->Destroy();      return SetPreviousViewer(prevViewer);    }  }  mPreviousViewer = aViewer;  return NS_OK;}