Bug 1479575 - Search region reset. r=mikedeboer, a=pascalc
authorMichael Kaply <mozilla@kaply.com>
Wed, 10 Oct 2018 18:40:21 +0000
changeset 490276 94ae3c41f785
parent 490275 119b1911d0da
child 490277 b6b6ccb319ba
push id9971
push userryanvm@gmail.com
push dateThu, 11 Oct 2018 19:46:56 +0000
treeherdermozilla-beta@94ae3c41f785 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer, pascalc
bugs1479575
milestone63.0
Bug 1479575 - Search region reset. r=mikedeboer, a=pascalc Doing a one time search region reset again. Differential Revision: https://phabricator.services.mozilla.com/D8269
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -2096,17 +2096,17 @@ BrowserGlue.prototype = {
       }
     }
   },
 
   // eslint-disable-next-line complexity
   _migrateUI: function BG__migrateUI() {
     // Use an increasing number to keep track of the current migration state.
     // Completely unrelated to the current Firefox release number.
-    const UI_VERSION = 73;
+    const UI_VERSION = 74;
     const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL;
 
     let currentUIVersion;
     if (Services.prefs.prefHasUserValue("browser.migration.version")) {
       currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
     } else {
       // This is a new profile, nothing to migrate.
       Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -2446,16 +2446,20 @@ BrowserGlue.prototype = {
                         { ignoreAbsent: true });
       for (const filename of ["addons.json", "plugins.json", "gfx.json"]) {
         // Some old versions used to dump without subfolders. Clean them while we are at it.
         const path = OS.Path.join(OS.Constants.Path.profileDir, `blocklists-${filename}`);
         OS.File.remove(path, { ignoreAbsent: true });
       }
     }
 
+    if (currentUIVersion < 74) {
+      Services.prefs.clearUserPref("browser.search.region");
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   _checkForDefaultBrowser() {
     // Perform default browser checking.
     if (!ShellService) {
       return;