author | Dale Harvey <dale@arandomurl.com> |
Fri, 09 Aug 2019 13:58:08 +0000 | |
changeset 487204 | 542a03a334cdb2c6232f0a4c2b1a21bd16e99466 |
parent 487203 | e68a224480507640c15a8bb7da8429311154527d |
child 487205 | ed05c5d39154122abbc3cb5f8c7d69be4d8562c8 |
push id | 92159 |
push user | dharvey@mozilla.com |
push date | Fri, 09 Aug 2019 13:59:48 +0000 |
treeherder | autoland@542a03a334cd [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | Gijs |
bugs | 1562601 |
milestone | 70.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -2684,17 +2684,17 @@ BrowserGlue.prototype = { ); }); }, // eslint-disable-next-line complexity _migrateUI: function BG__migrateUI() { // Use an increasing number to keep track of the current migration state. // Completely unrelated to the current Firefox release number. - const UI_VERSION = 85; + const UI_VERSION = 86; const BROWSER_DOCURL = AppConstants.BROWSER_CHROME_URL; let currentUIVersion; if (Services.prefs.prefHasUserValue("browser.migration.version")) { currentUIVersion = Services.prefs.getIntPref("browser.migration.version"); } else { // This is a new profile, nothing to migrate. Services.prefs.setIntPref("browser.migration.version", UI_VERSION); @@ -3075,16 +3075,35 @@ BrowserGlue.prototype = { const CUSTOM_BLOCKING_PREF = "browser.contentblocking.customBlockList.preferences.ui.enabled"; // Check if user has set custom tables pref, and show custom block list UI // in the about:preferences#privacy custom panel. if (Services.prefs.prefHasUserValue(TRACKING_TABLE_PREF)) { Services.prefs.setBoolPref(CUSTOM_BLOCKING_PREF, true); } } + + if (currentUIVersion < 86) { + // If the user has set "media.autoplay.allow-muted" to false + // migrate that to media.autoplay.default=BLOCKED_ALL. + if ( + Services.prefs.prefHasUserValue("media.autoplay.allow-muted") && + !Services.prefs.getBoolPref("media.autoplay.allow-muted") && + !Services.prefs.prefHasUserValue("media.autoplay.default") && + Services.prefs.getIntPref("media.autoplay.default") == + Ci.nsIAutoplay.BLOCKED + ) { + Services.prefs.setIntPref( + "media.autoplay.default", + Ci.nsIAutoplay.BLOCKED_ALL + ); + } + Services.prefs.clearUserPref("media.autoplay.allow-muted"); + } + // Update the migration version. Services.prefs.setIntPref("browser.migration.version", UI_VERSION); }, _checkForDefaultBrowser() { // Perform default browser checking. if (!ShellService) { return;