From 408ba7a40c8f5f13f4bed49636484e71067d0b1e Mon Sep 17 00:00:00 2001 From: "dougt%netscape.com" Date: Wed, 6 Feb 2002 20:47:37 +0000 Subject: [PATCH] Fix for 103518. Call module destructor function *after* destroying factories. submitted by Henry.Jia@sun.com, r=dp/dougt, sr=alecf git-svn-id: svn://10.0.0.236/trunk@113819 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/components/nsGenericFactory.cpp | 6 +++--- mozilla/xpcom/glue/nsGenericFactory.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/xpcom/components/nsGenericFactory.cpp b/mozilla/xpcom/components/nsGenericFactory.cpp index 07b15a38918..4beba6a7d67 100644 --- a/mozilla/xpcom/components/nsGenericFactory.cpp +++ b/mozilla/xpcom/components/nsGenericFactory.cpp @@ -278,15 +278,15 @@ nsGenericModule::Initialize() void nsGenericModule::Shutdown() { + // Release the factory objects + mFactories.Reset(); + if (mInitialized) { mInitialized = PR_FALSE; if (mDtor) mDtor(this); } - - // Release the factory objects - mFactories.Reset(); } // Create a factory object for creating instances of aClass. diff --git a/mozilla/xpcom/glue/nsGenericFactory.cpp b/mozilla/xpcom/glue/nsGenericFactory.cpp index 07b15a38918..4beba6a7d67 100644 --- a/mozilla/xpcom/glue/nsGenericFactory.cpp +++ b/mozilla/xpcom/glue/nsGenericFactory.cpp @@ -278,15 +278,15 @@ nsGenericModule::Initialize() void nsGenericModule::Shutdown() { + // Release the factory objects + mFactories.Reset(); + if (mInitialized) { mInitialized = PR_FALSE; if (mDtor) mDtor(this); } - - // Release the factory objects - mFactories.Reset(); } // Create a factory object for creating instances of aClass.