Bug 740769. (Bv1) Convert test_bug325418.js file to LF end-of-lines, Fix nsITimer.idl documentation. r=bzbarsky.
authorSerge Gautherie <sgautherie.bz@free.fr>
Tue, 10 Apr 2012 04:32:19 +0200
changeset 91235 6fe5b0271cd125c7a7fca5b75bc04943c6b31d08
parent 91234 7702bca6b64d7e71e9eede8c139ef51929468688
child 91236 2374ebd5026f86aab18d3e4fbfd484e5b3f5cbbb
child 91522 8bf75b4eafb42e2c3d027d4f4a7f87398f7f0358
push id22431
push usersgautherie.bz@free.fr
push dateTue, 10 Apr 2012 02:33:07 +0000
treeherdermozilla-central@6fe5b0271cd1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs740769, 325418
milestone14.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 740769. (Bv1) Convert test_bug325418.js file to LF end-of-lines, Fix nsITimer.idl documentation. r=bzbarsky. DONTBUILD.
xpcom/tests/unit/test_bug325418.js
xpcom/threads/nsITimer.idl
--- a/xpcom/tests/unit/test_bug325418.js
+++ b/xpcom/tests/unit/test_bug325418.js
@@ -1,31 +1,31 @@
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-var timer;
-const start_time = (new Date()).getTime();
-const expected_time = 1;
-
-var observer = {
-  observe: function observeTC(subject, topic, data) {
-    if (topic == "timer-callback") {
-      timer.cancel();
-      timer = null;
-
-      // expected time may not be exact so convert to seconds and round down.
-      var result = Math.floor(((new Date()).getTime() - start_time) / 1000);
-      do_check_eq(result, expected_time);
-
-      do_test_finished();
-    }
-  }
-};
-
-function run_test() {
-  do_test_pending();
-
-  timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-  // Start a 5 second timer, than cancel it and start a 1 second timer.
-  timer.init(observer, 5000, timer.TYPE_REPEATING_PRECISE);
-  timer.cancel();
-  timer.init(observer, 1000, timer.TYPE_REPEATING_PRECISE);
-}
\ No newline at end of file
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+
+var timer;
+const start_time = (new Date()).getTime();
+const expected_time = 1;
+
+var observer = {
+  observe: function observeTC(subject, topic, data) {
+    if (topic == "timer-callback") {
+      timer.cancel();
+      timer = null;
+
+      // expected time may not be exact so convert to seconds and round down.
+      var result = Math.floor(((new Date()).getTime() - start_time) / 1000);
+      do_check_eq(result, expected_time);
+
+      do_test_finished();
+    }
+  }
+};
+
+function run_test() {
+  do_test_pending();
+
+  timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
+  // Start a 5 second timer, than cancel it and start a 1 second timer.
+  timer.init(observer, 5000, timer.TYPE_REPEATING_PRECISE);
+  timer.cancel();
+  timer.init(observer, 1000, timer.TYPE_REPEATING_PRECISE);
+}
--- a/xpcom/threads/nsITimer.idl
+++ b/xpcom/threads/nsITimer.idl
@@ -172,18 +172,17 @@ interface nsITimer : nsISupports
    */
   [noscript] void initWithFuncCallback(in nsTimerCallbackFunc aCallback,
                                        in voidPtr aClosure,
                                        in unsigned long aDelay, 
                                        in unsigned long aType);
 
   /**
    * Initialize a timer to fire after the given millisecond interval.
-   * This version takes a function to call and a closure to pass to
-   * that function.
+   * This version takes a function to call.
    *
    * @param aFunc      nsITimerCallback interface to call when timer expires
    * @param aDelay     The millisecond interval
    * @param aType      Timer type per TYPE* consts defined above
    */
   void initWithCallback(in nsITimerCallback aCallback,
                         in unsigned long aDelay, 
                         in unsigned long aType);