Bug 1321274 - Remove usage of javascript String generics: chat/im. r?aleth draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 30 Nov 2016 17:55:56 +0100
changeset 21192 64fabd2e33871a992fb70cc7f6decaafa9a19f5f
parent 21191 cbefa86ae5680e66ecf3f10dac20d7f6ea34aaa2
child 21193 10a69e037de95a8ab350a56ee89c9860aa342a3b
push id75
push userarchaeopteryx@coole-files.de
push dateWed, 30 Nov 2016 16:57:01 +0000
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,