Bug 1120159 - Replace nonstandard expression closure with an arrow function in file:// directory listing. r=mcmanus
authorChris Peterson <cpeterson@mozilla.com>
Sat, 10 Jan 2015 23:20:22 -0800
changeset 249015 e341d9d84469c1e4c93df41799b5edefaab09fbe
parent 249014 3cbd9323c8963df4f15b83a19e6efa7a74a2c23e
child 249016 b684185c1c542c75868adf0b7d16293d3cc6b1c7
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1120159
milestone37.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 1120159 - Replace nonstandard expression closure with an arrow function in file:// directory listing. r=mcmanus
netwerk/streamconv/converters/nsIndexedToHTML.cpp
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -341,16 +341,17 @@ nsIndexedToHTML::DoOnStartRequest(nsIReq
                          "}\n"
                          ".dir::before {\n"
                          "  content: url(resource://gre/res/html/folder.png);\n"
                          "}\n"
                          "</style>\n"
                          "<link rel=\"stylesheet\" media=\"screen, projection\" type=\"text/css\""
                          " href=\"chrome://global/skin/dirListing/dirListing.css\">\n"
                          "<script type=\"application/javascript\">\n"
+                         "'use strict';\n"
                          "var gTable, gOrderBy, gTBody, gRows, gUI_showHidden;\n"
                          "document.addEventListener(\"DOMContentLoaded\", function() {\n"
                          "  gTable = document.getElementsByTagName(\"table\")[0];\n"
                          "  gTBody = gTable.tBodies[0];\n"
                          "  if (gTBody.rows.length < 2)\n"
                          "    return;\n"
                          "  gUI_showHidden = document.getElementById(\"UI_showHidden\");\n"
                          "  var headCells = gTable.tHead.rows[0].cells,\n"
@@ -365,17 +366,17 @@ nsIndexedToHTML::DoOnStartRequest(nsIReq
                          "    var anchor = document.createElement(\"a\");\n"
                          "    anchor.href = \"\";\n"
                          "    anchor.appendChild(headCells[i].firstChild);\n"
                          "    headCells[i].appendChild(anchor);\n"
                          "    headCells[i].addEventListener(\"click\", rowAction(i), true);\n"
                          "  }\n"
                          "  if (gUI_showHidden) {\n"
                          "    gRows = Array.slice(gTBody.rows);\n"
-                         "    hiddenObjects = gRows.some(function (row) row.className == \"hidden-object\");\n"
+                         "    hiddenObjects = gRows.some(row => row.className == \"hidden-object\");\n"
                          "  }\n"
                          "  gTable.setAttribute(\"order\", \"\");\n"
                          "  if (hiddenObjects) {\n"
                          "    gUI_showHidden.style.display = \"block\";\n"
                          "    updateHidden();\n"
                          "  }\n"
                          "}, \"false\");\n"
                          "function compareRows(rowA, rowB) {\n"