From 1e5e004c86649cc712703befbf110c61fe9b4be6 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Tue, 8 Sep 1998 22:38:48 +0000 Subject: [PATCH] Flush font cache before destroying device context to break circular links (ick) git-svn-id: svn://10.0.0.236/trunk@9565 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 5 ++++- mozilla/webshell/src/nsWebShell.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 96b71f39c2f..487913f98a0 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -350,7 +350,10 @@ nsWebShell::~nsWebShell() NS_IF_RELEASE(mInnerWindow); NS_IF_RELEASE(mContentViewer); - NS_IF_RELEASE(mDeviceContext); + if (nsnull != mDeviceContext) { + mDeviceContext->FlushFontCache(); + NS_RELEASE(mDeviceContext); + } NS_IF_RELEASE(mPrefs); NS_IF_RELEASE(mContainer); NS_IF_RELEASE(mObserver); diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index 96b71f39c2f..487913f98a0 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -350,7 +350,10 @@ nsWebShell::~nsWebShell() NS_IF_RELEASE(mInnerWindow); NS_IF_RELEASE(mContentViewer); - NS_IF_RELEASE(mDeviceContext); + if (nsnull != mDeviceContext) { + mDeviceContext->FlushFontCache(); + NS_RELEASE(mDeviceContext); + } NS_IF_RELEASE(mPrefs); NS_IF_RELEASE(mContainer); NS_IF_RELEASE(mObserver);