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); }