Bug 1120161 - Replace nonstandard expression closures with arrow functions in about:support. r=adw
authorChris Peterson <cpeterson@mozilla.com>
Sat, 10 Jan 2015 11:40:03 -0800
changeset 223501 60dce8dda79f0f4f80a4fb2640d29ec33f0af539
parent 223500 b13879fe21753f65714a42f5e41dd84558189769
child 223502 2c50affabe2fc187b13b814daab415d671e03158
push id28095
push usercbook@mozilla.com
push dateTue, 13 Jan 2015 13:24:48 +0000
treeherdermozilla-central@a5700bec72e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1120161
milestone38.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 1120161 - Replace nonstandard expression closures with arrow functions in about:support. r=adw
toolkit/content/aboutSupport.js
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -1,12 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+"use strict";
+
 const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Troubleshoot.jsm");
 Cu.import("resource://gre/modules/ResetProfile.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "PluralForm",
@@ -342,29 +344,29 @@ let $ = document.getElementById.bind(doc
   if (Array.isArray(textContentOrChildren))
     this.append(elt, textContentOrChildren);
   else
     elt.textContent = String(textContentOrChildren);
   return elt;
 };
 
 $.append = function $_append(parent, children) {
-  children.forEach(function (c) parent.appendChild(c));
+  children.forEach(c => parent.appendChild(c));
 };
 
 function stringBundle() {
   return Services.strings.createBundle(
            "chrome://global/locale/aboutSupport.properties");
 }
 
 function sortedArrayFromObject(obj) {
   let tuples = [];
   for (let prop in obj)
     tuples.push([prop, obj[prop]]);
-  tuples.sort(function ([prop1, v1], [prop2, v2]) prop1.localeCompare(prop2));
+  tuples.sort(([prop1, v1], [prop2, v2]) => prop1.localeCompare(prop2));
   return tuples;
 }
 
 function copyRawDataToClipboard(button) {
   if (button)
     button.disabled = true;
   try {
     Troubleshoot.snapshot(function (snapshot) {