Bug 1518639: Remote unused mProfileName member. r=froydnj
☠☠ backed out by fc8431c4497f ☠ ☠
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 12 Feb 2019 17:36:22 +0000
changeset 458768 14c454f88604
parent 458767 51becd44a8cb
child 458769 0780bd0ba2e1
push id35548
push useropoprus@mozilla.com
push dateWed, 13 Feb 2019 09:48:26 +0000
treeherdermozilla-central@93e37c529818 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1518639
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1518639: Remote unused mProfileName member. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D19416
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -2065,18 +2065,18 @@ static nsCOMPtr<nsIToolkitProfile> gRese
 // 1) check for --profile <path>
 // 2) check for -P <name>
 // 3) check for --ProfileManager
 // 4) use the default profile, if there is one
 // 5) if there are *no* profiles, set up profile-migration
 // 6) display the profile-manager UI
 static nsresult SelectProfile(nsIProfileLock** aResult,
                               nsToolkitProfileService* aProfileSvc,
-                              nsINativeAppSupport* aNative, bool* aStartOffline,
-                              nsACString* aProfileName) {
+                              nsINativeAppSupport* aNative,
+                              bool* aStartOffline) {
   StartupTimeline::Record(StartupTimeline::SELECT_PROFILE);
 
   nsresult rv;
   ArgResult ar;
   *aResult = nullptr;
   *aStartOffline = false;
 
   ar = CheckArg("offline", nullptr,
@@ -2175,21 +2175,16 @@ static nsresult SelectProfile(nsIProfile
     if (NS_SUCCEEDED(rv)) {
       rv = profile->GetRootDir(getter_AddRefs(rootDir));
       NS_ENSURE_SUCCESS(rv, rv);
       SaveFileToEnv("XRE_PROFILE_PATH", rootDir);
 
       rv = profile->GetLocalDir(getter_AddRefs(localDir));
       NS_ENSURE_SUCCESS(rv, rv);
       SaveFileToEnv("XRE_PROFILE_LOCAL_PATH", localDir);
-
-      rv = profile->GetName(*aProfileName);
-      if (NS_FAILED(rv)) {
-        aProfileName->Truncate(0);
-      }
     } else {
       NS_WARNING("Profile reset failed.");
       return NS_ERROR_ABORT;
     }
   }
 
   // No profile could be found. This generally shouldn't happen, a new profile
   // should be created in all cases except for profile reset which is covered
@@ -2212,23 +2207,16 @@ static nsresult SelectProfile(nsIProfile
     if (profile) {
       rv = profile->Lock(getter_AddRefs(unlocker), aResult);
     } else {
       rv = NS_LockProfilePath(rootDir, localDir, getter_AddRefs(unlocker),
                               aResult);
     }
     if (NS_SUCCEEDED(rv)) {
       StartupTimeline::Record(StartupTimeline::AFTER_PROFILE_LOCKED);
-      // Try to grab the profile name.
-      if (aProfileName && profile) {
-        rv = profile->GetName(*aProfileName);
-        if (NS_FAILED(rv)) {
-          aProfileName->Truncate(0);
-        }
-      }
       return NS_OK;
     }
     PR_Sleep(kLockRetrySleepMS);
   } while (TimeStamp::Now() - start <
            TimeDuration::FromSeconds(kLockRetrySeconds));
 
   return ProfileLockedDialog(rootDir, localDir, unlocker, aNative, aResult);
 }
@@ -2998,17 +2986,16 @@ class XREMain {
   nsProfileLock mRemoteLock;
   nsCOMPtr<nsIFile> mRemoteLockDir;
 #endif
 
   UniquePtr<ScopedXPCOMStartup> mScopedXPCOM;
   UniquePtr<XREAppData> mAppData;
 
   nsXREDirProvider mDirProvider;
-  nsAutoCString mProfileName;
   nsAutoCString mDesktopStartupID;
 
   bool mStartOffline;
   bool mShuttingDown;
 #if defined(MOZ_WIDGET_GTK)
   bool mDisableRemote;
 #endif
 
@@ -4179,17 +4166,17 @@ int XREMain::XRE_mainStartup(bool* aExit
   }
   if (NS_FAILED(rv)) {
     // We failed to choose or create profile - notify user and quit
     ProfileMissingDialog(mNativeApp);
     return 1;
   }
 
   rv = SelectProfile(getter_AddRefs(mProfileLock), mProfileSvc, mNativeApp,
-                     &mStartOffline, &mProfileName);
+                     &mStartOffline);
   if (rv == NS_ERROR_LAUNCHED_CHILD_PROCESS || rv == NS_ERROR_ABORT) {
     *aExitFlag = true;
     return 0;
   }
 
   if (NS_FAILED(rv)) {
     // We failed to choose or create profile - notify user and quit
     ProfileMissingDialog(mNativeApp);