From d498f23c07967cc79d4e289a5ef1b5307f80c75c Mon Sep 17 00:00:00 2001 From: Panos Astithas Date: Fri, 31 Oct 2014 17:25:34 +0200 Subject: [PATCH] Don't use the aurora-specific profile by default, if this is not aurora (bug 1090967). r=bsmedberg --HG-- extra : rebase_source : 5bfd3551ed6305e0a58ad1be98e60d210ba78730 --- toolkit/xre/nsAppRunner.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 395ab5f05f4..2dbc16b6aed 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -2335,6 +2335,21 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n return ShowProfileManager(aProfileSvc, aNative); } +#ifndef MOZ_DEV_EDITION + // If the only existing profile is the dev-edition-profile and this is not + // Developer Edition, then no valid profiles were found. + if (count == 1) { + nsCOMPtr deProfile; + // GetSelectedProfile will auto-select the only profile if there's just one + aProfileSvc->GetSelectedProfile(getter_AddRefs(deProfile)); + nsAutoCString profileName; + deProfile->GetName(profileName); + if (profileName.EqualsLiteral("dev-edition-default")) { + count = 0; + } + } +#endif + if (!count) { gDoMigration = true; gDoProfileReset = false; @@ -2345,6 +2360,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n NS_LITERAL_CSTRING("default"), getter_AddRefs(profile)); if (NS_SUCCEEDED(rv)) { + aProfileSvc->SetDefaultProfile(profile); aProfileSvc->Flush(); rv = profile->Lock(nullptr, aResult); if (NS_SUCCEEDED(rv)) {