Bug 371372: No print session created (regression from bug 370966). r+sr=roc.

This commit is contained in:
sharparrow1%yahoo.com 2007-02-23 19:29:15 +00:00
Родитель 7ddfc6c360
Коммит b74b6d8562
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -483,6 +483,17 @@ nsPrintEngine::DoCommonPrint(PRBool aIsPrintPreview,
SetIsPrinting(PR_TRUE);
}
// Create a print session and let the print settings know about it.
// The print settings hold an nsWeakPtr to the session so it does not
// need to be cleared from the settings at the end of the job.
// XXX What lifetime does the printSession need to have?
nsCOMPtr<nsIPrintSession> printSession;
if (!aIsPrintPreview) {
printSession = do_CreateInstance("@mozilla.org/gfx/printsession;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
mPrt->mPrintSettings->SetPrintSession(printSession);
}
if (aWebProgressListener != nsnull) {
mPrt->mPrintProgressListeners.AppendObject(aWebProgressListener);
}