From 3882adee6e2dd72eb5556cca6dd5b75e73d866d5 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 15 Aug 2019 12:51:59 +0000 Subject: [PATCH] Bug 1572925 - Make sure that about:support doesn't list the URL decorations pref as an important locked preference; r=baku Differential Revision: https://phabricator.services.mozilla.com/D42019 --HG-- extra : moz-landing-system : lando --- toolkit/modules/Troubleshoot.jsm | 10 +++++++++- toolkit/modules/tests/browser/browser_Troubleshoot.js | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index 84d97605f24f..f7635e0e2a1f 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -114,6 +114,8 @@ PREFS_GETTERS[Ci.nsIPrefBranch.PREF_INT] = (prefs, name) => PREFS_GETTERS[Ci.nsIPrefBranch.PREF_BOOL] = (prefs, name) => prefs.getBoolPref(name); +const kURLDecorationPref = "privacy.restrict3rdpartystorage.url_decorations"; + // Return the preferences filtered by PREFS_BLACKLIST and PREFS_WHITELIST lists // and also by the custom 'filter'-ing function. function getPrefList(filter) { @@ -384,7 +386,13 @@ var dataProviders = { }, lockedPreferences: function lockedPreferences(done) { - done(getPrefList(name => Services.prefs.prefIsLocked(name))); + // The URL Decoration pref isn't an important locked pref, so there is no + // good reason to report it. + done( + getPrefList( + name => name != kURLDecorationPref && Services.prefs.prefIsLocked(name) + ) + ); }, graphics: function graphics(done) { diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index a4ea96d7ef36..da472b7f0d40 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -285,6 +285,7 @@ const SNAPSHOT_SCHEMA = { lockedPreferences: { required: true, type: "object", + properties: {}, }, graphics: { required: true,