From 61408b539febb3bb2309cd9965adcf8a41b25794 Mon Sep 17 00:00:00 2001 From: Bryce Van Dyk Date: Tue, 9 Feb 2016 20:42:56 +1300 Subject: [PATCH] Bug 1246842 - Rework previous commit to not used deprecated arguments.callee r=cpearce MozReview-Commit-ID: DFWNOGN0FyY --HG-- extra : transplant_source : %1E%0D%0E%F7%EB%AE%10%40%D6%C2%3F%03%EC%16%98%91Z%60%D8%20 --- dom/media/mediasource/test/mediasource.js | 4 ++-- dom/media/test/manifest.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/media/mediasource/test/mediasource.js b/dom/media/mediasource/test/mediasource.js index 4d0642f950cc..09a21edac38d 100644 --- a/dom/media/mediasource/test/mediasource.js +++ b/dom/media/mediasource/test/mediasource.js @@ -53,8 +53,8 @@ function range(start, end) { function once(target, name, cb) { var p = new Promise(function(resolve, reject) { - target.addEventListener(name, function() { - target.removeEventListener(name, arguments.callee); + target.addEventListener(name, function onceEvent() { + target.removeEventListener(name, onceEvent); resolve(); }); }); diff --git a/dom/media/test/manifest.js b/dom/media/test/manifest.js index 03e4cbdde91a..d2315327df74 100644 --- a/dom/media/test/manifest.js +++ b/dom/media/test/manifest.js @@ -1357,8 +1357,8 @@ function removeNodeAndSource(n) { function once(target, name, cb) { var p = new Promise(function(resolve, reject) { - target.addEventListener(name, function() { - target.removeEventListener(name, arguments.callee); + target.addEventListener(name, function onceEvent() { + target.removeEventListener(name, onceEvent); resolve(); }); });