Bug 1321274 - Remove usage of javascript String generics: chat/im. r=aleth
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 01 Dec 2016 22:59:38 +0100
changeset 27100 14dc361515067ad74811e70543cc4acc7266e212
parent 27099 712ce63ce4be9b922a85af8f06fd81b4d30a8b8b
child 27101 fa53301f7178e84b38403e83dfaa7f71a28f357a
push id1878
push userclokep@gmail.com
push dateTue, 07 Mar 2017 14:18:40 +0000
treeherdercomm-beta@ab59ffd05575 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaleth
bugs1321274
Bug 1321274 - Remove usage of javascript String generics: chat/im. r=aleth MozReview-Commit-ID: 9fUgGB1KGVA
chat/components/src/imAccounts.js
im/modules/ibCore.jsm
--- a/chat/components/src/imAccounts.js
+++ b/chat/components/src/imAccounts.js
@@ -867,17 +867,17 @@ AccountsService.prototype = {
   _observingAccountListChange: true,
   _prefObserver: null,
   observe: function(aSubject, aTopic, aData) {
     if (aTopic != "nsPref:changed" || aData != kPrefMessengerAccounts ||
        !this._observingAccountListChange)
       return;
 
     this._accounts =
-      this._accountList.split(",").map(String.trim)
+      this._accountList.split(",").map(account => account.trim())
           .filter(k => k.startsWith(kAccountKeyPrefix))
           .map(k => parseInt(k.substr(kAccountKeyPrefix.length)))
           .map(this.getAccountByNumericId, this)
           .filter(a => a);
 
     Services.obs.notifyObservers(this, "account-list-updated", null);
   },
 
--- a/im/modules/ibCore.jsm
+++ b/im/modules/ibCore.jsm
@@ -20,17 +20,17 @@ var Core = {
     "quit-application-granted"
   ],
 
   get bundle() { return l10nHelper("chrome://instantbird/locale/core.properties"); },
 
   initLibpurpleOverrides: function() {
     let forcePurple = Services.prefs.getCharPref("chat.prpls.forcePurple")
                               .split(",")
-                              .map(String.trim)
+                              .map(aPrplId => aPrplId.trim())
                               .filter(aPrplId => !!aPrplId);
     if (!forcePurple.length)
       return;
 
     let catMan =
       Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
     for (let prplId of forcePurple) {
       catMan.addCategoryEntry("im-protocol-plugin", prplId,