Bug 658738 - Schedule final GC before finishing the browser-chrome test suite. r=gavin
authorDão Gottwald <dao@mozilla.com>
Wed, 06 Jul 2011 08:15:52 +0200
changeset 73429 58101c64c83c60218c2c0ad06db526e74faea412
parent 73428 6840fbf4dcdd6f62cbe0b48f2d8289bdd5e9f678
child 73430 a6dd98edd75f5b01b42728978c589d4477beacb5
push id67
push userclegnitto@mozilla.com
push dateFri, 04 Nov 2011 22:39:41 +0000
treeherdermozilla-release@04778346a3b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs658738
milestone8.0a1
first release with
nightly linux32
58101c64c83c / 8.0a1 / 20110706030833 / files
nightly linux64
58101c64c83c / 8.0a1 / 20110706030833 / files
nightly mac
58101c64c83c / 8.0a1 / 20110706030833 / files
nightly win32
58101c64c83c / 8.0a1 / 20110706030833 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 658738 - Schedule final GC before finishing the browser-chrome test suite. r=gavin
testing/mochitest/browser-test.js
--- a/testing/mochitest/browser-test.js
+++ b/testing/mochitest/browser-test.js
@@ -194,17 +194,19 @@ Tester.prototype = {
       this.currentTest.scope = null;
     }
 
     // Check the window state for the current test before moving to the next one.
     // This also causes us to check before starting any tests, since nextTest()
     // is invoked to start the tests.
     this.waitForWindowsState((function () {
       if (this.done) {
-        this.finish();
+        // Schedule GC before finishing in order to be able to report an accurate
+        // DOM window count at the end of this test suite.
+        Cu.schedulePreciseGC(this.finish.bind(this));
         return;
       }
 
       this.currentTestIndex++;
       this.execTest();
     }).bind(this));
   },