if (mPrintListener) {   mPrintListener->OnEndPrinting(NS_OK); mPrintListener = do_QueryInterface(nsnull); }
DoProgressForAsIsFrames(); DoProgressForSeparateFrames();
DocumentViewerImpl::DonePrintingPages(){  // Clean up   // first set of data members could be null  // if the print job was cancelled  if (mPrintPresShell != nsnull) {    mPrintPresShell->EndObservingDocument();    NS_RELEASE(mPrintPresShell);  }  NS_IF_RELEASE(mPrintViewManager);  NS_IF_RELEASE(mPrintStyleSet);  NS_IF_RELEASE(mPrintPresContext);  // printing is complete, clean up now  mIsPrinting = PR_FALSE;  mPrintPS->EndObservingDocument();  // Now check to see if there are anymore webshells  // that need to be printed.  if (mPrintDocList && mPrintDocList->Count() > 0) {    PrintDocContent();    return PR_FALSE;  }  if (mPrintListener) {    // send the last notification to the listener    // and then we release the listener    mPrintListener->OnEndPrinting(NS_OK);    mPrintListener = do_QueryInterface(nsnull);  }  mPrintDC->EndDocument();  NS_RELEASE(mPrintPS);  NS_RELEASE(mPrintVM);  NS_RELEASE(mPrintSS);  NS_RELEASE(mPrintDC);  NS_RELEASE(mPrintPC);  return PR_TRUE;}