Bug 1319935 - Remove String generics uses in devtools. r=bgrins
authorAndré Bargull <andre.bargull@gmail.com>
Thu, 24 Nov 2016 13:16:44 -0800
changeset 324752 8361e025e4c796b90027fe7c88018780b4c2a4ee
parent 324751 9607364780c2ad20c0770b62064c66f6ffddbd82
child 324753 1e6c0d61f55400a54d4f889817c77584af6a92ef
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersbgrins
bugs1319935
milestone53.0a1
Bug 1319935 - Remove String generics uses in devtools. r=bgrins
devtools/client/webconsole/test/browser_webconsole_bug_1006027_message_timestamps_incorrect.js
devtools/shared/gcli/commands/addon.js
--- a/devtools/client/webconsole/test/browser_webconsole_bug_1006027_message_timestamps_incorrect.js
+++ b/devtools/client/webconsole/test/browser_webconsole_bug_1006027_message_timestamps_incorrect.js
@@ -29,17 +29,17 @@ function test() {
     info("hud.outputNode.textContent:\n" + hud.outputNode.textContent);
     let timestampNodes = hud.outputNode.querySelectorAll("span.timestamp");
     let aTimestampMilliseconds = Array.prototype.map.call(timestampNodes,
       function (value) {
         // We are parsing timestamps as local time, relative to the begin of
         // the epoch.
         // This is not the correct value of the timestamp, but good enough for
         // comparison.
-        return Date.parse("T" + String.trim(value.textContent));
+        return Date.parse("T" + String(value.textContent).trim());
       });
 
     let minTimestamp = Math.min.apply(null, aTimestampMilliseconds);
     let maxTimestamp = Math.max.apply(null, aTimestampMilliseconds);
     ok(Math.abs(maxTimestamp - minTimestamp) < 2000,
        "console.log message timestamp spread < 2000ms confirmed");
   }
 }
--- a/devtools/shared/gcli/commands/addon.js
+++ b/devtools/shared/gcli/commands/addon.js
@@ -171,17 +171,17 @@ var items = [
           if (addon.isActive) {
             enabledAddons.push(addon);
           } else {
             disabledAddons.push(addon);
           }
         });
 
         function compareAddonNames(nameA, nameB) {
-          return String.localeCompare(nameA.name, nameB.name);
+          return String(nameA.name).localeCompare(nameB.name);
         }
         enabledAddons.sort(compareAddonNames);
         disabledAddons.sort(compareAddonNames);
 
         return enabledAddons.concat(disabledAddons);
       }
 
       function isActiveForToggle(addon) {