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;