Bug 1320144 - Remove String generics uses in browser/base/content. r=gijs
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 24 Nov 2016 13:18:26 -0800
changeset 324756 c90a24c73ffff6e6302d7c040f3bdd7457fe1871
parent 324755 26551118afb7716ed8f789acf84487c9f184286c
child 324757 a3c15e0b3c4ca1a8f3f3cae1e35bdae18696f6f3
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersgijs
bugs1320144
milestone53.0a1
Bug 1320144 - Remove String generics uses in browser/base/content. r=gijs
browser/base/content/browser-media.js
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -298,19 +298,19 @@ let gDecoderDoctorHandler = {
         Cu.reportError("Malformed Decoder Doctor unsolved message with no formats");
         return;
       }
       if (!formatsInPref) {
         Services.prefs.setCharPref(formatsPref, formats);
         histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_SHOWN_FIRST);
       } else {
         // Split existing formats into an array of strings.
-        let existing = formatsInPref.split(",").map(String.trim);
+        let existing = formatsInPref.split(",").map(x => x.trim());
         // Keep given formats that were not already recorded.
-        let newbies = formats.split(",").map(String.trim)
+        let newbies = formats.split(",").map(x => x.trim())
                       .filter(x => !existing.includes(x));
         // And rewrite pref with the added new formats (if any).
         if (newbies.length) {
           Services.prefs.setCharPref(formatsPref,
                                      existing.concat(newbies).join(", "));
         }
       }
       histogram.add(decoderDoctorReportId, TELEMETRY_DDSTAT_SHOWN);