Bug 362734 Crash [@ nsPrintEngine::DocumentReadyForPrinting] with testcase that sets print preview, then reloads the page, patch by Andrew Smith, r=sharparrow1, sr=roc (blocking1.9 bug)
git-svn-id: svn://10.0.0.236/trunk@233885 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
cb1fd64e02
commit
1eed6e98b8
@ -1464,6 +1464,14 @@ DocumentViewerImpl::Destroy()
|
||||
|
||||
#ifdef NS_PRINTING
|
||||
if (mPrintEngine) {
|
||||
#ifdef NS_PRINT_PREVIEW
|
||||
PRBool doingPrintPreview;
|
||||
mPrintEngine->GetDoingPrintPreview(&doingPrintPreview);
|
||||
if (doingPrintPreview) {
|
||||
mPrintEngine->FinishPrintPreview();
|
||||
}
|
||||
#endif
|
||||
|
||||
mPrintEngine->Destroy();
|
||||
mPrintEngine = nsnull;
|
||||
}
|
||||
@ -3451,13 +3459,6 @@ DocumentViewerImpl::Print(nsIPrintSettings* aPrintSettings,
|
||||
return rv;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation above in the nsIContentViewerfile class definition
|
||||
* @update 11/01/01 rods
|
||||
*
|
||||
* For a full and detailed understanding of the issues with
|
||||
* PrintPreview: See the design spec that is attached to Bug 107562
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
DocumentViewerImpl::PrintPreview(nsIPrintSettings* aPrintSettings,
|
||||
nsIDOMWindow *aChildDOMWin,
|
||||
|
||||
@ -712,13 +712,6 @@ nsPrintEngine::Print(nsIPrintSettings* aPrintSettings,
|
||||
return CommonPrint(PR_FALSE, aPrintSettings, aWebProgressListener);
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------
|
||||
* See documentation above in the nsIContentViewerfile class definition
|
||||
* @update 11/01/01 rods
|
||||
*
|
||||
* For a full and detailed understanding of the issues with
|
||||
* PrintPreview: See the design spec that is attached to Bug 107562
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsPrintEngine::PrintPreview(nsIPrintSettings* aPrintSettings,
|
||||
nsIDOMWindow *aChildDOMWin,
|
||||
@ -2534,6 +2527,9 @@ void nsPrintEngine::SetIsPrinting(PRBool aIsPrinting)
|
||||
if (mDocViewerPrint) {
|
||||
mDocViewerPrint->SetIsPrinting(aIsPrinting);
|
||||
}
|
||||
if (mPrt && aIsPrinting) {
|
||||
mPrt->mPreparingForPrint = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
@ -59,16 +59,6 @@ class nsIPageSequenceFrame;
|
||||
//------------------------------------------------------------------------
|
||||
// nsPrintEngine Class
|
||||
//
|
||||
// mPreparingForPrint - indicates that we have started Printing but
|
||||
// have not gone to the timer to start printing the pages. It gets turned
|
||||
// off right before we go to the timer.
|
||||
//
|
||||
// mDocWasToBeDestroyed - Gets set when "someone" tries to unload the document
|
||||
// while we were prparing to Print. This typically happens if a user starts
|
||||
// to print while a page is still loading. If they start printing and pause
|
||||
// at the print dialog and then the page comes in, we then abort printing
|
||||
// because the document is no longer stable.
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
class nsPrintEngine : public nsIObserver
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user