From 6022433002560a5955c8e932fb3cde0e94ccaf7a Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 10 Mar 1999 03:49:39 +0000 Subject: [PATCH] Warren's changes broke component creation for nsIMsgMailSession and nsIUrlListenerManager. Restore these so our code runs correctly. --- mailnews/base/build/nsMsgFactory.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mailnews/base/build/nsMsgFactory.cpp b/mailnews/base/build/nsMsgFactory.cpp index 930d24bf7293..cf21452ae00b 100644 --- a/mailnews/base/build/nsMsgFactory.cpp +++ b/mailnews/base/build/nsMsgFactory.cpp @@ -189,19 +189,23 @@ nsMsgFactory::CreateInstance(nsISupports *aOuter, { nsUrlListenerManager * listener = nsnull; listener = new nsUrlListenerManager(); - if (listener == nsnull) - return NS_ERROR_OUT_OF_MEMORY; + if (listener == nsnull) + return NS_ERROR_OUT_OF_MEMORY; + listener->QueryInterface(nsIUrlListenerManager::GetIID(), (void **) &inst); } else if (mClassID.Equals(kCMsgMailSessionCID)) { nsMsgMailSession * session = new nsMsgMailSession(); - if (session == nsnull) - return NS_ERROR_OUT_OF_MEMORY; + if (session == nsnull) + return NS_ERROR_OUT_OF_MEMORY; + session->QueryInterface(nsIMsgMailSession::GetIID(), (void **) &inst); + + } + else if (mClassID.Equals(kCMsgAppCoreCID)) + { + res = NS_NewMsgAppCore((nsIDOMMsgAppCore **)&inst); + if (NS_FAILED(res)) return res; } - else if (mClassID.Equals(kCMsgAppCoreCID)) { - res = NS_NewMsgAppCore((nsIDOMMsgAppCore **)&inst); - if (NS_FAILED(res)) return res; - } // End of checking the interface ID code.... if (inst)