Bug 1139460 - Bonus: Remove unused function from experiments code. rs=yoric

This commit is contained in:
Georg Fritzsche 2015-03-19 15:50:09 +01:00
parent c344dda9fd
commit 5e7d6a5f63

View File

@ -139,28 +139,6 @@ function configureLogging() {
}
}
// Takes an array of promises and returns a promise that is resolved once all of
// them are rejected or resolved.
function allResolvedOrRejected(promises) {
if (!promises.length) {
return Promise.resolve([]);
}
let countdown = promises.length;
let deferred = Promise.defer();
for (let p of promises) {
let helper = () => {
if (--countdown == 0) {
deferred.resolve();
}
};
Promise.resolve(p).then(helper, helper);
}
return deferred.promise;
}
// Loads a JSON file using OS.file. file is a string representing the path
// of the file to be read, options contains additional options to pass to
// OS.File.read.