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
Родитель 1a9c91afde
Коммит 4d8b9aa07b
1 изменённых файлов: 0 добавлений и 22 удалений

Просмотреть файл

@ -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 // 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 // of the file to be read, options contains additional options to pass to
// OS.File.read. // OS.File.read.