Bug 1625503 - Treat stored 'breached' sort direction as 'alerts' for backwards-compatibility. r=sfoster
authorJared Wein <jwein@mozilla.com>
Mon, 30 Mar 2020 20:21:19 +0000
changeset 521133 1ee026c2ed474e9e49e0a4bea8ff6ec67ffa6b1c
parent 521132 60dc189e64d2bb1dac44ecd85c6c4fc696af6230
child 521134 846bb08e41e1d7b053e98aec8f4b0d61936257fc
push id37267
push userccoroiu@mozilla.com
push dateTue, 31 Mar 2020 04:31:43 +0000
treeherdermozilla-central@cb87343d4976 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfoster
bugs1625503
milestone76.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 1625503 - Treat stored 'breached' sort direction as 'alerts' for backwards-compatibility. r=sfoster Differential Revision: https://phabricator.services.mozilla.com/D68852
browser/components/aboutlogins/AboutLoginsParent.jsm
--- a/browser/components/aboutlogins/AboutLoginsParent.jsm
+++ b/browser/components/aboutlogins/AboutLoginsParent.jsm
@@ -413,22 +413,28 @@ class AboutLoginsParent extends JSWindow
             Services.locale.langNegStrategyLookup
           )[0];
 
           const selectedBadgeLanguages = {
             appStoreBadgeLanguage,
             playStoreBadgeLanguage,
           };
 
+          let selectedSort = Services.prefs.getCharPref(
+            "signon.management.page.sort",
+            "name"
+          );
+          if (selectedSort == "breached") {
+            // The "breached" value was used since Firefox 70 and
+            // replaced with "alerts" in Firefox 76.
+            selectedSort = "alerts";
+          }
           this.sendAsyncMessage("AboutLogins:Setup", {
             logins,
-            selectedSort: Services.prefs.getCharPref(
-              "signon.management.page.sort",
-              "name"
-            ),
+            selectedSort,
             syncState,
             selectedBadgeLanguages,
             masterPasswordEnabled: LoginHelper.isMasterPasswordSet(),
             passwordRevealVisible: Services.policies.isAllowed(
               "passwordReveal"
             ),
             importVisible:
               Services.policies.isAllowed("profileImport") &&