From 4238c3c5cdd36924d8280b4964fd47dc89a0208b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Sat, 20 Feb 2016 14:04:03 +0100 Subject: [PATCH] Bug 1249608 - Don't run UI migration steps with new profiles. r=gijs --- browser/components/nsBrowserGlue.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index bec56f27c240..d77835931a3b 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -1808,10 +1808,16 @@ BrowserGlue.prototype = { _migrateUI: function BG__migrateUI() { const UI_VERSION = 36; const BROWSER_DOCURL = "chrome://browser/content/browser.xul"; - let currentUIVersion = 0; - try { + + let currentUIVersion; + if (Services.prefs.prefHasUserValue("browser.migration.version") { currentUIVersion = Services.prefs.getIntPref("browser.migration.version"); - } catch(ex) {} + } else { + // This is a new profile, nothing to migrate. + Services.prefs.setIntPref("browser.migration.version", UI_VERSION); + return; + } + if (currentUIVersion >= UI_VERSION) return;