From ec351ddd412b4fc8291b7fea436e6669b77934de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Tue, 3 Dec 2019 19:54:38 +0000 Subject: [PATCH] Bug 1601014 - avoid running BrowserGlue migration steps for new profiles, r=mconley. Differential Revision: https://phabricator.services.mozilla.com/D55704 --HG-- extra : moz-landing-system : lando --- browser/components/BrowserGlue.jsm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index d23e281acbb0..e4bea04c733b 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -2799,16 +2799,17 @@ BrowserGlue.prototype = { const UI_VERSION = 89; const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL; - let currentUIVersion; - if (Services.prefs.prefHasUserValue("browser.migration.version")) { - currentUIVersion = Services.prefs.getIntPref("browser.migration.version"); - this._isNewProfile = false; - } else { + if (!Services.prefs.prefHasUserValue("browser.migration.version")) { // This is a new profile, nothing to migrate. Services.prefs.setIntPref("browser.migration.version", UI_VERSION); this._isNewProfile = true; + return; } + this._isNewProfile = false; + let currentUIVersion = Services.prefs.getIntPref( + "browser.migration.version" + ); if (currentUIVersion >= UI_VERSION) { return; }