Bug 1312406 and bug 1255361 - part 2: remove tab groups backup, r=Dolske
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 01 Nov 2016 16:12:19 +0000
changeset 320767 789a88b977b620e32bf70658a3bb2cf0fe07785d
parent 320766 465512fbb69bc2b9f015d10b853d441895ce93ac
child 320768 66ab1149f1514f72e8ff5a2ea9df8a96f8e38a6c
push id30904
push userphilringnalda@gmail.com
push dateFri, 04 Nov 2016 02:24:17 +0000
treeherdermozilla-central@38fcc30d818f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersDolske
bugs1312406, 1255361
milestone52.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 1312406 and bug 1255361 - part 2: remove tab groups backup, r=Dolske MozReview-Commit-ID: 96AFjsXE1w0
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1768,17 +1768,17 @@ BrowserGlue.prototype = {
       if (topic != "alertclickcallback")
         return;
       this._openPreferences("sync");
     }
     AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
   },
 
   _migrateUI: function BG__migrateUI() {
-    const UI_VERSION = 41;
+    const UI_VERSION = 42;
     const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
 
     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);
@@ -2096,16 +2096,22 @@ BrowserGlue.prototype = {
       }
     }
 
     if (currentUIVersion < 41) {
       const Preferences = Cu.import("resource://gre/modules/Preferences.jsm", {}).Preferences;
       Preferences.resetBranch("loop.");
     }
 
+    if (currentUIVersion < 42) {
+      let backupFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
+      backupFile.append("tabgroups-session-backup.json");
+      OS.File.remove(backupFile.path, {ignoreAbsent: true}).catch(ex => Cu.reportError(ex));
+    }
+
     // Update the migration version.
     Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
   },
 
   _hasExistingNotificationPermission: function BG__hasExistingNotificationPermission() {
     let enumerator = Services.perms.enumerator;
     while (enumerator.hasMoreElements()) {
       let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);