From 0f01c7b8cd576f9e29c9ebc4a6a0353e30bddc8e Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Fri, 23 Nov 2001 10:31:30 +0000 Subject: [PATCH] re-disable this problematic memory-pressure observer as it causes device contexts to hang around until shutdown. bug 109974. Need more investigation. In the meantime, the font cache retains the ability to compact itself when font handles are running out git-svn-id: svn://10.0.0.236/trunk@108833 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/nsDeviceContext.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mozilla/gfx/src/nsDeviceContext.cpp b/mozilla/gfx/src/nsDeviceContext.cpp index 01ce85f72a8..fd337c9e2ce 100644 --- a/mozilla/gfx/src/nsDeviceContext.cpp +++ b/mozilla/gfx/src/nsDeviceContext.cpp @@ -63,9 +63,14 @@ static PRBool PR_CALLBACK DeleteValue(nsHashKey* aKey, void* aValue, void* closu DeviceContextImpl :: ~DeviceContextImpl() { +#if 0 + //XXX temporarily disabled because it causes device context contexts + //XXX to hang around until shutdown + nsCOMPtr obs(do_GetService("@mozilla.org/observer-service;1")); if (obs) obs->RemoveObserver(this, "memory-pressure"); +#endif if (nsnull != mFontCache) { @@ -109,11 +114,16 @@ void DeviceContextImpl :: CommonInit(void) for (PRInt32 cnt = 0; cnt < 256; cnt++) mGammaTable[cnt] = cnt; +#if 0 + //XXX temporarily disabled because it causes device context contexts + //XXX to hang around until shutdown + // register as a memory-pressure observer to free font resources // in low-memory situations. nsCOMPtr obs(do_GetService("@mozilla.org/observer-service;1")); if (obs) obs->AddObserver(this, "memory-pressure", PR_FALSE); +#endif } NS_IMETHODIMP DeviceContextImpl :: GetTwipsToDevUnits(float &aTwipsToDevUnits) const