diff --git a/xpcom/glue/nsMemory.cpp b/xpcom/glue/nsMemory.cpp index ec4879ad94bb..e79b66fe3d18 100644 --- a/xpcom/glue/nsMemory.cpp +++ b/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/xpcom/io/nsDirectoryService.cpp b/xpcom/io/nsDirectoryService.cpp index a959785a9cbf..e63f8b199f06 100644 --- a/xpcom/io/nsDirectoryService.cpp +++ b/xpcom/io/nsDirectoryService.cpp @@ -590,7 +590,8 @@ nsDirectoryService::~nsDirectoryService() NS_IF_RELEASE(nsDirectoryService::sSystemDirectory); #endif - + // clear the global + mService = nsnull; }