if (mPrintListener) { if (!mOnStartSent) { mPrintListener->OnStartPrinting(); } mPrintListener->OnEndPrinting(aResult);  mPrintListener = nsnull;
OnStartPrinting();  DoOnProgressChange(mPrintProgressListeners, 100, 100, PR_TRUE, nsIWebProgressListener::STATE_STOP|nsIWebProgressListener::STATE_IS_DOCUMENT); if (mPrintProgress && mShowProgressDialog) { mPrintProgress->CloseProgressDialog(PR_TRUE);
void PrintData::OnEndPrinting(nsresult aResult){  if (mPrintListener) {    if (!mOnStartSent) {      mPrintListener->OnStartPrinting();    }    mPrintListener->OnEndPrinting(aResult);    // clear the lister so the destructor doesn't send the    mPrintListener = nsnull;  }}