From 6d8f69ffb2178147ce574cf46e45022084f15e03 Mon Sep 17 00:00:00 2001 From: "ssu%netscape.com" Date: Fri, 1 Nov 2002 08:53:07 +0000 Subject: [PATCH] fixing bug 21025 - Profiles from N7 appear after installation. sr=sspitzer,r=varada git-svn-id: svn://10.0.0.236/branches/ISHMAIL_1_0_BRANCH@132814 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/embedding/xre/nsAppRunner.cpp | 14 ++++++++++++-- mozilla/mailnews/app/nsMailApp.cpp | 18 ------------------ 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/mozilla/embedding/xre/nsAppRunner.cpp b/mozilla/embedding/xre/nsAppRunner.cpp index bdd3b746409..006f6a8da64 100644 --- a/mozilla/embedding/xre/nsAppRunner.cpp +++ b/mozilla/embedding/xre/nsAppRunner.cpp @@ -1358,14 +1358,24 @@ static nsresult main1(int argc, char* argv[], nsISupports *nativeApp, NS_ASSERTION(NS_SUCCEEDED(rv), "Initializing AppleEvents failed"); #endif + NS_TIMELINE_ENTER("setup registry"); + // Ask XPInstall if we need to autoregister anything new. + PRBool needAutoReg = NS_SoftwareUpdateNeedsAutoReg(); + #ifdef DEBUG // _Always_ autoreg if we're in a debug build, under the assumption // that people are busily modifying components and will be angry if // their changes aren't noticed. - nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, - NULL /* default */); + needAutoReg = PR_TRUE; #endif + if (needAutoReg) { + nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, + NULL /* default */); + // XXX ...and autoreg was successful? + NS_SoftwareUpdateDidAutoReg(); + } + NS_TIMELINE_LEAVE("setup registry"); // remove the nativeApp as an XPCOM autoreg observer if (obsService) diff --git a/mozilla/mailnews/app/nsMailApp.cpp b/mozilla/mailnews/app/nsMailApp.cpp index e7b488f01ff..ac2cf56e771 100644 --- a/mozilla/mailnews/app/nsMailApp.cpp +++ b/mozilla/mailnews/app/nsMailApp.cpp @@ -48,24 +48,6 @@ int main(int argc, char* argv[]) appData.SetSplashEnabled(PR_FALSE); appData.SetProductName(NS_LITERAL_CSTRING("Minotaur")); appData.SetUseStartupPrefs(PR_TRUE); - - // Ask XPInstall if we need to autoregister anything new. - PRBool needAutoReg = NS_SoftwareUpdateNeedsAutoReg(); - -#ifdef DEBUG - // _Always_ autoreg if we're in a debug build, under the assumption - // that people are busily modifying components and will be angry if - // their changes aren't noticed. - needAutoReg = PR_TRUE; -#endif - - if (needAutoReg) { - nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, - NULL /* default */); - // XXX ...and autoreg was successful? - NS_SoftwareUpdateDidAutoReg(); - } - return xre_main(argc, argv, appData); }