Bug 1597899 - Port bug 1596065: Hide database enumeration option in about:support if the pref is off. r=jorgk
authorRichard Marti <richard.marti@gmail.com>
Wed, 20 Nov 2019 15:35:23 +0200
changeset 36698 a9f2973479f1a5f89d650019584aa214f501d945
parent 36697 afee24ca2f118226ecb57602882f9fa5469ba7b1
child 36699 956bb4e418daaad886028d28eeda853366788888
push id2534
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:52:51 +0000
treeherdercomm-beta@055c50840778 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1597899, 1596065
Bug 1597899 - Port bug 1596065: Hide database enumeration option in about:support if the pref is off. r=jorgk
mail/components/about-support/content/aboutSupport.js
--- a/mail/components/about-support/content/aboutSupport.js
+++ b/mail/components/about-support/content/aboutSupport.js
@@ -918,16 +918,22 @@ var snapshotFormatters = {
       let rows = [];
       for (let dev of devices) {
         rows.push(createDeviceInfoRow(dev));
       }
       $.append($("media-" + side + "-devices-tbody"), rows);
     }
 
     function insertEnumerateDatabase() {
+      if (
+        !Services.prefs.getBoolPref("media.mediacapabilities.from-database")
+      ) {
+        $("media-capabilities-tbody").style.display = "none";
+        return;
+      }
       let button = $("enumerate-database-button");
       if (button) {
         button.addEventListener("click", function(event) {
           let { KeyValueService } = ChromeUtils.import(
             "resource://gre/modules/kvstore.jsm"
           );
           let currProfDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
           currProfDir.append("mediacapabilities");