Bug 1148103: P1. Fix mediasource "once" utility. r=karlt
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 10 Jul 2015 12:17:55 +0100
changeset 252319 233db46481d72fcd97f1716172b06f82f90c866a
parent 252318 5ff1786019f038a88372f21bd9cfafd623b75771
child 252320 40eefa29c76dd8ddb2b76c2919242ab6051023d6
push id29031
push userkwierso@gmail.com
push dateFri, 10 Jul 2015 23:06:54 +0000
treeherdermozilla-central@9f2b81411bf5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1148103
milestone42.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 1148103: P1. Fix mediasource "once" utility. r=karlt
dom/media/mediasource/test/mediasource.js
--- a/dom/media/mediasource/test/mediasource.js
+++ b/dom/media/mediasource/test/mediasource.js
@@ -50,17 +50,17 @@ function range(start, end) {
     rv.push(i);
   }
   return rv;
 }
 
 function once(target, name, cb) {
   var p = new Promise(function(resolve, reject) {
     target.addEventListener(name, function() {
-      target.removeEventListener(name, cb);
+      target.removeEventListener(name, arguments.callee);
       resolve();
     });
   });
   if (cb) {
     p.then(cb);
   }
   return p;
 }