summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/nsDocumentViewer.cpp7
-rw-r--r--layout/base/nsIDocumentViewerPrint.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index 782ac332c..137efb3cd 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -1617,7 +1617,6 @@ nsDocumentViewer::Destroy()
// We also keep the viewer from being cached in session history, since
// we require all documents there to be sanitized.
if (mDestroyRefCount != 0) {
- --mDestroyRefCount;
return NS_OK;
}
@@ -4426,6 +4425,12 @@ nsDocumentViewer::IncrementDestroyRefCount()
++mDestroyRefCount;
}
+void
+nsDocumentViewer::DecrementDestroyRefCount()
+{
+ --mDestroyRefCount;
+}
+
//------------------------------------------------------------
#if defined(NS_PRINTING) && defined(NS_PRINT_PREVIEW)
diff --git a/layout/base/nsIDocumentViewerPrint.h b/layout/base/nsIDocumentViewerPrint.h
index 8bc2465a1..e3c397f3a 100644
--- a/layout/base/nsIDocumentViewerPrint.h
+++ b/layout/base/nsIDocumentViewerPrint.h
@@ -41,6 +41,7 @@ public:
virtual mozilla::StyleSetHandle CreateStyleSet(nsIDocument* aDocument) = 0;
virtual void IncrementDestroyRefCount() = 0;
+ virtual void DecrementDestroyRefCount() = 0;
virtual void ReturnToGalleyPresentation() = 0;
@@ -75,6 +76,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentViewerPrint,
bool GetIsPrintPreview() override; \
mozilla::StyleSetHandle CreateStyleSet(nsIDocument* aDocument) override; \
void IncrementDestroyRefCount() override; \
+ void DecrementDestroyRefCount() override; \
void ReturnToGalleyPresentation() override; \
void OnDonePrinting() override; \
bool IsInitializedForPrintPreview() override; \