Bug 1655674: Prevent nsPrintJob::FinishPrintPreview running twice by checking mIsCreatingPrintPreview. r=jwatt

Differential Revision: https://phabricator.services.mozilla.com/D86320
This commit is contained in:
Bob Owen 2020-08-07 09:32:45 +00:00
Родитель 8aa2e27c24
Коммит ff0078c4dd
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -2693,8 +2693,10 @@ nsresult nsPrintJob::FinishPrintPreview() {
#ifdef NS_PRINT_PREVIEW
if (!mPrt) {
/* we're already finished with print preview */
// If mPrt is null we've already finished with print preview. If mPrt is not
// null but mIsCreatingPrintPreview is false FinishPrintPreview must have
// already failed due to DocumentReadyForPrinting failing.
if (!mPrt || !mIsCreatingPrintPreview) {
return rv;
}