Bug 1157701 - Properly remove usage of Array.prototype.includes(). r=jib
authorAndreas Pehrson <pehrsons@gmail.com>
Tue, 28 Apr 2015 21:24:00 +0200
changeset 273136 20406039cdebb797c6990dbbb7d3bf42bbacaa30
parent 273135 7516ef90ea6045ccecdc611bcd2794b662bcb403
child 273137 20de9d756c9b668caa95f277dee6de7b558b014c
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1157701
milestone40.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 1157701 - Properly remove usage of Array.prototype.includes(). r=jib
dom/media/tests/mochitest/pc.js
--- a/dom/media/tests/mochitest/pc.js
+++ b/dom/media/tests/mochitest/pc.js
@@ -1541,17 +1541,17 @@ PeerConnectionWrapper.prototype = {
    *        A promise that resolves when we're receiving the tone from |from|.
    */
   checkReceivingToneFrom : function(from) {
     var inputElem = from.localMediaElements[0];
 
     // As input we use the stream of |from|'s first available audio sender.
     var inputSenderTracks = from._pc.getSenders().map(sn => sn.track);
     var inputAudioStream = from._pc.getLocalStreams()
-      .find(s => s.getAudioTracks().some(t => inputSenderTracks.includes(t)));
+      .find(s => s.getAudioTracks().some(t => inputSenderTracks.some(t2 => t == t2)));
     var inputAnalyser = new AudioStreamAnalyser(inputAudioStream);
 
     // It would have been nice to have a working getReceivers() here, but until
     // we do, let's use what remote streams we have.
     var outputAudioStream = this._pc.getRemoteStreams()
       .find(s => s.getAudioTracks().length > 0);
     var outputAnalyser = new AudioStreamAnalyser(outputAudioStream);