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
This commit is contained in:
Florian Quèze 2019-12-03 19:54:38 +00:00
parent 7a0e6b4873
commit ec351ddd41

View File

@ -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;
}