Bug 1144742: Unload the test module loader at the end of test runs to make leak detection easier. r=erikvold
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 26 Mar 2015 11:51:57 -0700
changeset 266168 a6c42747e5bc189b5fb34c5de587b1e63e59b49b
parent 266141 d5a537c7c5582d7edcdf83a3705d888259c62a6e
child 266169 ed5ed949d31c5d7d23c6150262569e7a3778ef27
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserikvold
bugs1144742
milestone39.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 1144742: Unload the test module loader at the end of test runs to make leak detection easier. r=erikvold
testing/mochitest/jetpack-package-harness.js
--- a/testing/mochitest/jetpack-package-harness.js
+++ b/testing/mochitest/jetpack-package-harness.js
@@ -225,16 +225,19 @@ function testInit() {
             dump("\tPassed: " + passed + "\n" +
                  "\tFailed: " + failed + "\n" +
                  "\tTodo: 0\n");
           }
 
           if (config.closeWhenDone) {
             require("sdk/system").exit(failed == 0 ? 0 : 1);
           }
+          else {
+            loaderModule.unload(loader, "shutdown");
+          }
         }
 
         function testNextModule() {
           if (fileNames.length == 0)
             return finish();
 
           let filename = fileNames.shift();
           testModule(require, filename).then(tests => {