Bustage fix from bug 484442
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 21 Apr 2009 11:53:43 -0700
changeset 27582 4209e25766b7c1f35ef9e079e1ace73a6b582796
parent 27581 524233971e2c0b172dd6fc9bffd85aa95db886c6
child 27583 fd32b8b9ec85a10f7abab3dbef239e522f123ef6
push id6626
push userdtownsend@mozilla.com
push dateTue, 21 Apr 2009 18:53:55 +0000
treeherdermozilla-central@4209e25766b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs484442
milestone1.9.2a1pre
Bustage fix from bug 484442
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3213,24 +3213,24 @@ XRE_main(int argc, char* argv[], const n
 
 #if defined(HAVE_DESKTOP_STARTUP_ID) && defined(MOZ_WIDGET_GTK2)
         nsRefPtr<nsGTKToolkit> toolkit = GetGTKToolkit();
         if (toolkit && !desktopStartupID.IsEmpty()) {
           toolkit->SetDesktopStartupID(desktopStartupID);
         }
 #endif
 
+        nsCOMPtr<nsIFile> workingDir;
+        rv = NS_GetSpecialDirectory(NS_OS_CURRENT_WORKING_DIR, getter_AddRefs(workingDir));
+        NS_ENSURE_SUCCESS(rv, 1);
+
         if (!shuttingDown) {
           cmdLine = do_CreateInstance("@mozilla.org/toolkit/command-line;1");
           NS_ENSURE_TRUE(cmdLine, 1);
 
-          nsCOMPtr<nsIFile> workingDir;
-          rv = NS_GetSpecialDirectory(NS_OS_CURRENT_WORKING_DIR, getter_AddRefs(workingDir));
-          NS_ENSURE_SUCCESS(rv, 1);
-
           rv = cmdLine->Init(gArgc, gArgv,
                              workingDir, nsICommandLine::STATE_INITIAL_LAUNCH);
           NS_ENSURE_SUCCESS(rv, 1);
 
           /* Special-case services that need early access to the command
              line. */
           nsCOMPtr<nsIObserver> chromeObserver
             (do_GetService("@mozilla.org/chrome/chrome-registry;1"));
@@ -3333,17 +3333,19 @@ XRE_main(int argc, char* argv[], const n
 
           if (!shuttingDown) {
             rv = cmdLine->Run();
             NS_ENSURE_SUCCESS_LOG(rv, 1);
 
             appStartup->GetShuttingDown(&shuttingDown);
           }
 
+#ifdef MOZ_ENABLE_XREMOTE
           nsCOMPtr<nsIRemoteService> remoteService;
+#endif /* MOZ_ENABLE_XREMOTE */
           if (!shuttingDown) {
 #ifdef MOZ_ENABLE_XREMOTE
             // if we have X remote support, start listening for requests on the
             // proxy window.
             remoteService = do_GetService("@mozilla.org/toolkit/remote-service;1");
             if (remoteService)
               remoteService->Startup(gAppData->name,
                                      PromiseFlatCString(profileName).get());