Bug 1139460 - Bonus: Remove unused function from experiments code. rs=yoric
☠☠ backed out by b263e8671065 ☠ ☠
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Thu, 19 Mar 2015 15:50:09 +0100
changeset 266508 5e9ed1f7aebe5a49f84c2e5d82c2da85de16bcb7
parent 266507 79be0402cbdb800d5e08a5939ec53f54decbdf80
child 266509 d7a94bbfa3ef6a267d711d4e806fd3c6bbde0a77
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyoric
bugs1139460
milestone39.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 1139460 - Bonus: Remove unused function from experiments code. rs=yoric
browser/experiments/Experiments.jsm
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -134,38 +134,16 @@ function configureLogging() {
     } else {
       gLogger.removeAppender(gLogAppenderDump);
       gLogAppenderDump = null;
     }
     gLogDumping = logDumping;
   }
 }
 
-// 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.
 // Returns a Promise resolved with the json payload or rejected with
 // OS.File.Error or JSON.parse() errors.
 function loadJSONAsync(file, options) {
   return Task.spawn(function() {
     let rawData = yield OS.File.read(file, options);