Follow-up to Bug 1152764 - use indexOf rather than includes as Array.prototype is only available on nightly builds. r=mikedeboer
authorMark Banner <standard8@mozilla.com>
Tue, 26 May 2015 10:50:18 +0100
changeset 245558 b083735a6057580ada5c87069b668b02da216e1c
parent 245557 787bb8c566fb6e8cf19b62a528440b0d8b8a8c13
child 245588 2f7bd935c50dc297a69ad6d9b51fa698dc7908cc
push id13157
push usermbanner@mozilla.com
push dateTue, 26 May 2015 09:50:39 +0000
treeherderfx-team@b083735a6057 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1152764
milestone41.0a1
Follow-up to Bug 1152764 - use indexOf rather than includes as Array.prototype is only available on nightly builds. r=mikedeboer
browser/components/loop/modules/LoopRooms.jsm
--- a/browser/components/loop/modules/LoopRooms.jsm
+++ b/browser/components/loop/modules/LoopRooms.jsm
@@ -236,17 +236,17 @@ let LoopRoomsInternal = {
   /**
    * Queues a room for encryption sometime in the future. This is done so as
    * not to overload the server or the browser when we initially request the
    * list of rooms.
    *
    * @param {String} roomToken The token for the room that needs encrypting.
    */
   queueForEncryption: function(roomToken) {
-    if (!this.encryptionQueue.queue.includes(roomToken)) {
+    if (this.encryptionQueue.queue.indexOf(roomToken) == -1) {
       this.encryptionQueue.queue.push(roomToken);
     }
 
     // Set up encryption to happen at a random time later. There's a minimum
     // wait time - we don't need to do this straight away, so no need if the user
     // is starting up. We then add a random factor on top of that. This is to
     // try and avoid any potential with a set of clients being restarted at the
     // same time and flooding the server.