зеркало из https://github.com/mozilla/pjs.git
Bug 371372: No print session created (regression from bug 370966). r+sr=roc.
This commit is contained in:
Родитель
7ddfc6c360
Коммит
b74b6d8562
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче