Bug 1116413 - Fix example comment for PromiseUtils.resolveOrTimeout. r=yoric
authorTooru Fujisawa <arai_a@mac.com>
Wed, 07 Jan 2015 13:16:13 +0900
changeset 222335 fbb35d6d4151e2f00d65a8ede8cc4f105d9ab165
parent 222334 c1cba30ef56f68e8860581a678acf5af4a6fead5
child 222336 43d7ef42277746368e6f94b2ff9cf28c7898cd12
push id28063
push usercbook@mozilla.com
push dateWed, 07 Jan 2015 13:10:02 +0000
treeherdermozilla-central@395cc3fd41ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyoric
bugs1116413
milestone37.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 1116413 - Fix example comment for PromiseUtils.resolveOrTimeout. r=yoric
toolkit/modules/PromiseUtils.jsm
--- a/toolkit/modules/PromiseUtils.jsm
+++ b/toolkit/modules/PromiseUtils.jsm
@@ -8,17 +8,18 @@ this.EXPORTED_SYMBOLS = ["PromiseUtils"]
 
 Components.utils.import("resource://gre/modules/Timer.jsm");
 
 this.PromiseUtils = {
   /*
    * A simple timeout mechanism.
    *
    * Example:
-   * resolveOrTimeout(myModule.shutdown(), 1000, new Error("The module took too long to shutdown"));
+   * resolveOrTimeout(myModule.shutdown(), 1000,
+   *                  () => new Error("The module took too long to shutdown"));
    *
    * @param {Promise} promise The Promise that should resolve/reject quickly.
    * @param {number} delay A delay after which to stop waiting for `promise`, in milliseconds.
    * @param {function} rejection If `promise` hasn't resolved/rejected after `delay`,
    * a value used to construct the rejection.
    *
    * @return {Promise} A promise that behaves as `promise`, if `promise` is
    * resolved/rejected within `delay` ms, or rejects with `rejection()` otherwise.