From 14f2cba95a9a1f21b214e0c1e0d2ae7f1380550b Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Thu, 25 Mar 2004 18:29:33 +0000 Subject: [PATCH] Bug 238468 NS_APPSTARTUPNOTIFIER_CONTRACTID should not live very long r=bsmedberg sr=dbaron a=asa --- xpfe/bootstrap/nsAppRunner.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xpfe/bootstrap/nsAppRunner.cpp b/xpfe/bootstrap/nsAppRunner.cpp index 1c49c646ddf..56f5ef76c1f 100644 --- a/xpfe/bootstrap/nsAppRunner.cpp +++ b/xpfe/bootstrap/nsAppRunner.cpp @@ -1125,13 +1125,14 @@ static nsresult main1(int argc, char* argv[], nsISupports *nativeApp ) NS_TIMELINE_ENTER("startupNotifier"); // Start up the core services: - - // Please do not add new things to main1() - please hook into the - // nsIAppStartupNotifier service. - nsCOMPtr startupNotifier = do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID, &rv); - if(NS_FAILED(rv)) - return rv; - startupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull); + { + // Please do not add new things to main1() - please hook into the + // nsIAppStartupNotifier service. + nsCOMPtr startupNotifier = do_CreateInstance(NS_APPSTARTUPNOTIFIER_CONTRACTID, &rv); + if(NS_FAILED(rv)) + return rv; + startupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull); + } NS_TIMELINE_LEAVE("startupNotifier"); NS_TIMELINE_ENTER("cmdLineArgs");