From d6dd9bea7f731109dd9f9d81f82b98756f2edd9a Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Tue, 11 Jun 2002 19:38:41 +0000 Subject: [PATCH] Fix for 149754. cleaner xpcom shutdown. r=rpotts, sr=shaver git-svn-id: svn://10.0.0.236/trunk@123046 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/glue/nsMemory.cpp | 4 +--- mozilla/xpcom/io/nsDirectoryService.cpp | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mozilla/xpcom/glue/nsMemory.cpp b/mozilla/xpcom/glue/nsMemory.cpp index ec4879ad94b..e79b66fe3d1 100644 --- a/mozilla/xpcom/glue/nsMemory.cpp +++ b/mozilla/xpcom/glue/nsMemory.cpp @@ -42,17 +42,15 @@ static nsIMemory* gMemory = nsnull; -static PRBool gHasMemoryShutdown = PR_FALSE; static NS_METHOD FreeGlobalMemory(void) { NS_IF_RELEASE(gMemory); - gHasMemoryShutdown = PR_TRUE; return NS_OK; } #define ENSURE_ALLOCATOR \ - (gMemory ? PR_TRUE : !gHasMemoryShutdown && SetupGlobalMemory()) + (gMemory ? PR_TRUE : (PRBool) SetupGlobalMemory()) static nsIMemory* SetupGlobalMemory() diff --git a/mozilla/xpcom/io/nsDirectoryService.cpp b/mozilla/xpcom/io/nsDirectoryService.cpp index a959785a9cb..e63f8b199f0 100644 --- a/mozilla/xpcom/io/nsDirectoryService.cpp +++ b/mozilla/xpcom/io/nsDirectoryService.cpp @@ -590,7 +590,8 @@ nsDirectoryService::~nsDirectoryService() NS_IF_RELEASE(nsDirectoryService::sSystemDirectory); #endif - + // clear the global + mService = nsnull; }