Merge the last PGO-green changeset from mozilla-inbound into mozilla-central
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 10 Apr 2012 11:11:37 -0400
changeset 91310 3fa30b0edd155100e511fc2bd05dda82fd4666a2
parent 91293 f483227d1cbef80513ac2e329a2bf30f235b3b33 (current diff)
parent 91309 2374ebd5026f86aab18d3e4fbfd484e5b3f5cbbb (diff)
child 91311 2fd41fea3b27e5ac331b54786b38d30039a03201
child 91350 77f0e7d882dd2810179dee31d8240fac7555a5bd
push id8144
push usereakhgari@mozilla.com
push dateTue, 10 Apr 2012 15:12:35 +0000
treeherdermozilla-inbound@2fd41fea3b27 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone14.0a1
first release with
nightly mac
3fa30b0edd15 / 14.0a1 / 20120410120625 / files
nightly linux32
nightly linux64
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly mac
Merge the last PGO-green changeset from mozilla-inbound into mozilla-central
--- a/ipc/ipdl/Makefile.in
+++ b/ipc/ipdl/Makefile.in
@@ -110,17 +110,17 @@ LOCAL_INCLUDES += -I$(DEPTH)/ipc/ipdl/_i
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
 
 # NB: the IPDL compiler manages .ipdl-->.h/.cpp dependencies itself,
 # which is why we don't have explicit .h/.cpp targets here
 export:: $(ALL_IPDLSRCS)
-	$(PYTHON_PATH) \
+	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) \
 	  $(srcdir)/ipdl.py \
 	  --outheaders-dir=_ipdlheaders \
 	  --outcpp-dir=. \
 	  $(IPDLDIRS:%=-I$(topsrcdir)/%) \
 	  $^
 
 # We #include some things in the dom/plugins/ directory that rely on
--- a/js/xpconnect/src/Makefile.in
+++ b/js/xpconnect/src/Makefile.in
@@ -145,17 +145,17 @@ XPCJSRuntime.$(OBJ_SUFFIX): dom_quickstu
 
 dom_quickstubs.h: dom_quickstubs.cpp
 
 dom_quickstubs.cpp: $(srcdir)/dom_quickstubs.qsconf \
                     $(srcdir)/qsgen.py \
                     $(topsrcdir)/xpcom/idl-parser/header.py \
                     $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                     $(DEPTH)/js/src/js-confdefs.h
-	$(PYTHON_PATH) \
+	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) \
 	  -I$(topsrcdir)/xpcom/idl-parser \
 	  $(srcdir)/qsgen.py \
 	  --idlpath=$(DEPTH)/dist/idl \
 	  --cachedir=$(DEPTH)/xpcom/idl-parser \
 	  --header-output dom_quickstubs.h \
 	  --stub-output dom_quickstubs.cpp \
 	  --makedepend-output $(MDDEPDIR)/dom_qsgen.pp \
@@ -166,34 +166,34 @@ dombindings.$(OBJ_SUFFIX): dombindings_g
                            dombindings_gen.cpp
 
 dombindings_gen.h: $(srcdir)/dombindings.conf \
                    $(srcdir)/dombindingsgen.py \
                    $(srcdir)/codegen.py \
                    $(topsrcdir)/xpcom/idl-parser/header.py \
                    $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                    $(DEPTH)/js/src/js-confdefs.h
-	$(PYTHON_PATH) \
+	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) \
 	  -I$(topsrcdir)/xpcom/idl-parser \
 	  $(srcdir)/dombindingsgen.py \
 	  --idlpath=$(DEPTH)/dist/idl \
 	  --cachedir=$(DEPTH)/xpcom/idl-parser \
 	  --header-output dombindings_gen.h \
 	  $(srcdir)/dombindings.conf
 
 exports:: dombindings_gen.h
 
 dombindings_gen.cpp: $(srcdir)/dombindings.conf \
                      $(srcdir)/dombindingsgen.py \
                      $(srcdir)/codegen.py \
                      $(topsrcdir)/xpcom/idl-parser/header.py \
                      $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                      $(DEPTH)/js/src/js-confdefs.h
-	$(PYTHON_PATH) \
+	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) \
 	  -I$(topsrcdir)/xpcom/idl-parser \
 	  $(srcdir)/dombindingsgen.py \
 	  --idlpath=$(DEPTH)/dist/idl \
 	  --cachedir=$(DEPTH)/xpcom/idl-parser \
 	  --stub-output dombindings_gen.cpp \
 	  --makedepend-output $(MDDEPDIR)/dombindingsgen.pp \
 	  $(srcdir)/dombindings.conf
@@ -202,32 +202,32 @@ DictionaryHelpers.$(OBJ_SUFFIX): Diction
                                  DictionaryHelpers.cpp
 
 DictionaryHelpers.h: $(srcdir)/dictionary_helper_gen.conf \
                      $(srcdir)/dictionary_helper_gen.py \
                      $(srcdir)/codegen.py \
                      $(topsrcdir)/xpcom/idl-parser/header.py \
                      $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                      $(DEPTH)/js/src/js-confdefs.h
-	$(PYTHON_PATH) \
+	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) \
 	  -I$(topsrcdir)/xpcom/idl-parser \
 	  $(srcdir)/dictionary_helper_gen.py \
 	  -I $(DEPTH)/dist/idl \
 	  --cachedir=$(DEPTH)/xpcom/idl-parser \
 	  --header-output DictionaryHelpers.h \
 	  $(srcdir)/dictionary_helper_gen.conf
 
 DictionaryHelpers.cpp: $(srcdir)/dictionary_helper_gen.conf \
                        $(srcdir)/dictionary_helper_gen.py \
                        $(srcdir)/codegen.py \
                        $(topsrcdir)/xpcom/idl-parser/header.py \
                        $(topsrcdir)/xpcom/idl-parser/xpidl.py \
                        $(DEPTH)/js/src/js-confdefs.h
-	$(PYTHON_PATH) \
+	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) \
 	  -I$(topsrcdir)/xpcom/idl-parser \
 	  $(srcdir)/dictionary_helper_gen.py \
 	  -I $(DEPTH)/dist/idl \
 	  --cachedir=$(DEPTH)/xpcom/idl-parser \
 	  --header-output DictionaryHelpers.h \
 	  --stub-output DictionaryHelpers.cpp \
 	  --makedepend-output $(MDDEPDIR)/dictionary_helper_gen.pp \
--- a/xpcom/tests/unit/test_bug325418.js
+++ b/xpcom/tests/unit/test_bug325418.js
@@ -1,31 +1,61 @@
-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;
+
+// 5 seconds.
+const kExpectedDelay1 = 5;
+// 1 second.
+const kExpectedDelay2 = 1;
+
+var gStartTime1;
+var gStartTime2;
+var timer;
+
+var observer1 = {
+  observe: function observeTC1(subject, topic, data) {
+    if (topic == "timer-callback") {
+      // Stop timer, so it doesn't repeat (if test runs slowly).
+      timer.cancel();
+
+      // Actual delay may not be exact, so convert to seconds and round down.
+      do_check_eq(Math.floor((Date.now() - gStartTime1) / 1000),
+                  kExpectedDelay1);
+
+      timer = null;
+
+      do_print("1st timer triggered (before being cancelled). Should not have happened!");
+      do_check_true(false);
+    }
+  }
+};
+
+var observer2 = {
+  observe: function observeTC2(subject, topic, data) {
+    if (topic == "timer-callback") {
+      // Stop timer, so it doesn't repeat (if test runs slowly).
+      timer.cancel();
+
+      // Actual delay may not be exact, so convert to seconds and round down.
+      do_check_eq(Math.floor((Date.now() - gStartTime2) / 1000),
+                  kExpectedDelay2);
+
+      timer = null;
+
+      do_test_finished();
+    }
+  }
+};
+
+function run_test() {
+  do_test_pending();
+
+  timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
+
+  // Initialize the timer (with some delay), then cancel it.
+  gStartTime1 = Date.now();
+  timer.init(observer1, kExpectedDelay1 * 1000, timer.TYPE_REPEATING_PRECISE);
+  timer.cancel();
+
+  // Re-initialize the timer (with a different delay).
+  gStartTime2 = Date.now();
+  timer.init(observer2, kExpectedDelay2 * 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);