Bug 933882 - Force GC in Debugger mochitests for ASan. (r=past)

This commit is contained in:
Shu-yu Guo 2013-11-20 22:50:28 -08:00
parent 58f49b859c
commit 5d43c94bdc
4 changed files with 18 additions and 0 deletions

View File

@ -35,6 +35,10 @@ registerCleanupFunction(function() {
// Properly shut down the server to avoid memory leaks.
DebuggerServer.destroy();
// Debugger tests use a lot of memory, so force a GC to help fragmentation.
info("Forcing GC after debugger test.");
Cu.forceGC();
});
// Import the GCLI test helper

View File

@ -44,4 +44,8 @@ function test() {
aDebuggee.performRequests(1, CONTENT_TYPE_SJS + "?fmt=html-long");
});
// This test uses a lot of memory, so force a GC to help fragmentation.
info("Forcing GC after netmonitor test.");
Cu.forceGC();
}

View File

@ -29,6 +29,11 @@ registerCleanupFunction(function () {
Services.prefs.clearUserPref(REMOTE_ENABLED);
Services.prefs.clearUserPref(SHOW_PLATFORM_DATA);
DebuggerServer.destroy();
// These tests use a lot of memory due to GL contexts, so force a GC to help
// fragmentation.
info("Forcing GC after profiler test.");
Cu.forceGC();
});
function getProfileInternals(uid) {

View File

@ -38,6 +38,11 @@ registerCleanupFunction(() => {
info("finish() was called, cleaning up...");
Services.prefs.setBoolPref("devtools.debugger.log", gEnableLogging);
Services.prefs.setBoolPref("devtools.shadereditor.enabled", gToolEnabled);
// These tests use a lot of memory due to GL contexts, so force a GC to help
// fragmentation.
info("Forcing GC after shadereditor test.");
Cu.forceGC();
});
function addTab(aUrl, aWindow) {