Bug 1303707 - Fix collecting of formats-at-issues - r=Gijs
authorGerald Squelart <gsquelart@mozilla.com>
Sun, 18 Sep 2016 22:24:47 -0700
changeset 314375 c71904aaef6a13bb92159f650e806919460d0887
parent 314374 2b2ccdb21d028b7e5ad9e7011fcbf52ea52e2b35
child 314376 e0b4bad921cd807f96b911ffb6339bf67c913194
push id32372
push usergsquelart@mozilla.com
push dateMon, 19 Sep 2016 10:33:36 +0000
treeherderautoland@c71904aaef6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1303707
milestone51.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
Bug 1303707 - Fix collecting of formats-at-issues - r=Gijs Array.filter was given the wrong information, so we were only adding existing name, instead of adding new ones. This is not critical, as this is only useful to better find when issues are fixed, that's why I'm fixing it in a fly-by here. MozReview-Commit-ID: CGkN3BbSTge
browser/base/content/browser-media.js
--- a/browser/base/content/browser-media.js
+++ b/browser/base/content/browser-media.js
@@ -291,17 +291,17 @@ let gDecoderDoctorHandler = {
       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);
         // Keep given formats that were not already recorded.
         let newbies = formats.split(",").map(String.trim)
-                      .filter(x => existing.includes(x));
+                      .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);