Bug 1249608 - Don't run UI migration steps with new profiles. r=gijs

This commit is contained in:
Dão Gottwald 2016-02-20 14:04:03 +01:00
Родитель 594c008fcb
Коммит 4238c3c5cd
1 изменённых файлов: 9 добавлений и 3 удалений

Просмотреть файл

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