Bug 938945, gc/cc more during test runs, f=Ms2ger, pending-r=ted, a=Tomcat on a CLOSED TREE
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Fri, 15 Nov 2013 13:19:26 +0200
changeset 154846 c3d8ec0e53c776ba316f27f55a30e977fe4d4cdb
parent 154845 b2fab608772f4d8cc243be416638f54e38e4eb00
child 154847 8785dac978829a88c67c069bb670c5f570441c19
push id36170
push useropettay@mozilla.com
push dateFri, 15 Nov 2013 11:28:54 +0000
treeherdermozilla-inbound@c3d8ec0e53c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersTomcat
bugs938945
milestone28.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 938945, gc/cc more during test runs, f=Ms2ger, pending-r=ted, a=Tomcat on a CLOSED TREE
testing/mochitest/tests/SimpleTest/iframe-between-tests.html
--- a/testing/mochitest/tests/SimpleTest/iframe-between-tests.html
+++ b/testing/mochitest/tests/SimpleTest/iframe-between-tests.html
@@ -2,11 +2,21 @@
 <!--
   This page exists so that our accounting for assertions correctly
   counts assertions that happen while leaving a page.  We load this page
   after a test finishes, check the assertion counts, and then go on to
   load the next.
 -->
 <script>
 window.addEventListener("load", function() {
-  (parent.TestRunner || parent.wrappedJSObject.TestRunner).testUnloaded();
+  var runner = (parent.TestRunner || parent.wrappedJSObject.TestRunner);
+  runner.testUnloaded();
+
+  if (SpecialPowers) {
+    if (!runner.garbageCollectCount) {
+      runner.garbageCollectCount = 0;
+    }
+    if (runner.garbageCollectCount++ % 10 == 0) {
+      SpecialPowers.DOMWindowUtils.garbageCollect();
+    }
+  }
 });
 </script>