Verified Commit 2b944730 authored by Neel Chauhan's avatar Neel Chauhan Committed by Pier Angelo Vendrame
Browse files

fixup! BB 42027: Base Browser migration procedures.

BB 43629: Check for this._isNewProfile in _migrateUIBB()
parent dba06fad
Loading
Loading
Loading
Loading
+9 −0
Changes for browser/components/BrowserGlue.sys.mjs: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1882,6 +1882,15 @@ BrowserGlue.prototype = {
    // Version 3: 14.0a7: Reset general.smoothScroll. tor-browser#42070.
    const MIGRATION_VERSION = 3;
    const MIGRATION_PREF = "basebrowser.migration.version";
    if (this._isNewProfile) {
      // Do not migrate fresh profiles
      Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
      return;
    } else if (this._isNewProfile === undefined) {
      // If this happens, check if upstream updated their function and do not
      // set this member anymore!
      console.error("_migrateUIBB: this._isNewProfile is undefined.");
    }
    // We do not care whether this is a new or old profile, since in version 1
    // we just quickly clear a user preference, which should not do anything to
    // new profiles.