diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index f203238bacf9..483be3a7a1ae 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -536,6 +536,9 @@ already_AddRefed NS_NewContentViewer() { } void nsDocumentViewer::PrepareToStartLoad() { + MOZ_DIAGNOSTIC_ASSERT(!GetIsPrintPreview(), + "Print preview tab should never navigate"); + mStopped = false; mLoaded = false; mAttachedToParent = false; @@ -550,9 +553,6 @@ void nsDocumentViewer::PrepareToStartLoad() { if (mPrintJob) { mPrintJob->Destroy(); mPrintJob = nullptr; -# ifdef NS_PRINT_PREVIEW - SetIsPrintPreview(false); -# endif } #endif // NS_PRINTING