Loading browser/components/BrowserGlue.sys.mjs +22 −0 Original line number Diff line number Diff line Loading @@ -1300,6 +1300,9 @@ BrowserGlue.prototype = { // handle any UI migration this._migrateUI(); // Base Browser-specific version of _migrateUI. this._migrateUIBB(); // Handle any TBB-specific migration before showing the UI. Keep after // _migrateUI to make sure this._isNewProfile has been defined. this._migrateUITBB(); Loading Loading @@ -4404,6 +4407,25 @@ BrowserGlue.prototype = { Services.prefs.setIntPref("browser.migration.version", UI_VERSION); }, _migrateUIBB() { // Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override // for tor-browser#41739. const MIGRATION_VERSION = 1; const MIGRATION_PREF = "basebrowser.migration.version"; // 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. // Shall we ever raise the version number and have a watershed, we can add // a check easily (any version > 0 will be an old profile). const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0); if (currentVersion < 1) { Services.prefs.clearUserPref( "layout.css.prefers-color-scheme.content-override" ); } Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION); }, // Use this method for any TBB migration that can be run just before showing // the UI. // Anything that critically needs to be migrated earlier should not use this. Loading Loading
browser/components/BrowserGlue.sys.mjs +22 −0 Original line number Diff line number Diff line Loading @@ -1300,6 +1300,9 @@ BrowserGlue.prototype = { // handle any UI migration this._migrateUI(); // Base Browser-specific version of _migrateUI. this._migrateUIBB(); // Handle any TBB-specific migration before showing the UI. Keep after // _migrateUI to make sure this._isNewProfile has been defined. this._migrateUITBB(); Loading Loading @@ -4404,6 +4407,25 @@ BrowserGlue.prototype = { Services.prefs.setIntPref("browser.migration.version", UI_VERSION); }, _migrateUIBB() { // Version 1: 13.0a3. Reset layout.css.prefers-color-scheme.content-override // for tor-browser#41739. const MIGRATION_VERSION = 1; const MIGRATION_PREF = "basebrowser.migration.version"; // 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. // Shall we ever raise the version number and have a watershed, we can add // a check easily (any version > 0 will be an old profile). const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0); if (currentVersion < 1) { Services.prefs.clearUserPref( "layout.css.prefers-color-scheme.content-override" ); } Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION); }, // Use this method for any TBB migration that can be run just before showing // the UI. // Anything that critically needs to be migrated earlier should not use this. Loading