morgan pushed to branch mullvad-browser-153.0esr-16.0-1 at The Tor Project / Applications / Mullvad Browser

Commits:

1 changed file:

Changes:

  • browser/components/ProfileDataUpgrader.sys.mjs
    ... ... @@ -1026,7 +1026,15 @@ export let ProfileDataUpgrader = {
    1026 1026
         Services.prefs.setIntPref("browser.migration.version", newVersion);
    
    1027 1027
       },
    
    1028 1028
     
    
    1029
    -  upgradeBB(isNewProfile) {
    
    1029
    +  /**
    
    1030
    +   * Run the profile data migration for Base Browser if needed.
    
    1031
    +   *
    
    1032
    +   * @param {boolean} isNewProfile When true, just set the migration version
    
    1033
    +   * without actually changing anything.
    
    1034
    +   * @param {number} [currentVersion] The version to migrating from. To be used
    
    1035
    +   * only by tests.
    
    1036
    +   */
    
    1037
    +  upgradeBB(isNewProfile, currentVersion) {
    
    1030 1038
         // Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
    
    1031 1039
         //            for tor-browser#41739.
    
    1032 1040
         // Version 2: 14.0a5: Reset the privacy tracking headers preferences since
    
    ... ... @@ -1056,7 +1064,10 @@ export let ProfileDataUpgrader = {
    1056 1064
           console.error("upgradeBB: isNewProfile is undefined.");
    
    1057 1065
         }
    
    1058 1066
     
    
    1059
    -    const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
    
    1067
    +    if (currentVersion === undefined) {
    
    1068
    +      currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
    
    1069
    +    }
    
    1070
    +
    
    1060 1071
         if (currentVersion < 1) {
    
    1061 1072
           Services.prefs.clearUserPref(
    
    1062 1073
             "layout.css.prefers-color-scheme.content-override"