| ... | ... | @@ -1300,6 +1300,9 @@ BrowserGlue.prototype = { | 
| 1300 | 1300 |      // handle any UI migration
 | 
| 1301 | 1301 |      this._migrateUI();
 | 
| 1302 | 1302 |  
 | 
|  | 1303 | +    // Base Browser-specific version of _migrateUI.
 | 
|  | 1304 | +    this._migrateUIBB();
 | 
|  | 1305 | +
 | 
| 1303 | 1306 |      // Handle any TBB-specific migration before showing the UI. Keep after
 | 
| 1304 | 1307 |      // _migrateUI to make sure this._isNewProfile has been defined.
 | 
| 1305 | 1308 |      this._migrateUITBB();
 | 
| ... | ... | @@ -4404,6 +4407,25 @@ BrowserGlue.prototype = { | 
| 4404 | 4407 |      Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
 | 
| 4405 | 4408 |    },
 | 
| 4406 | 4409 |  
 | 
|  | 4410 | +  _migrateUIBB() {
 | 
|  | 4411 | +    // Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override
 | 
|  | 4412 | +    //            for tor-browser#41739.
 | 
|  | 4413 | +    const MIGRATION_VERSION = 1;
 | 
|  | 4414 | +    const MIGRATION_PREF = "basebrowser.migration.version";
 | 
|  | 4415 | +    // We do not care whether this is a new or old profile, since in version 1
 | 
|  | 4416 | +    // we just quickly clear a user preference, which should not do anything to
 | 
|  | 4417 | +    // new profiles.
 | 
|  | 4418 | +    // Shall we ever raise the version number and have a watershed, we can add
 | 
|  | 4419 | +    // a check easily (any version > 0 will be an old profile).
 | 
|  | 4420 | +    const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
 | 
|  | 4421 | +    if (currentVersion < 1) {
 | 
|  | 4422 | +      Services.prefs.clearUserPref(
 | 
|  | 4423 | +        "layout.css.prefers-color-scheme.content-override"
 | 
|  | 4424 | +      );
 | 
|  | 4425 | +    }
 | 
|  | 4426 | +    Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
 | 
|  | 4427 | +  },
 | 
|  | 4428 | +
 | 
| 4407 | 4429 |    // Use this method for any TBB migration that can be run just before showing
 | 
| 4408 | 4430 |    // the UI.
 | 
| 4409 | 4431 |    // Anything that critically needs to be migrated earlier should not use this.
 |