Backed out changeset 8d59556d361f (bug 1281341) for dt8 crashes

This commit is contained in:
Carsten "Tomcat" Book 2016-09-14 15:36:30 +02:00
parent 395241c288
commit 73a127f3e1
2 changed files with 8 additions and 4 deletions

View File

@ -102,10 +102,6 @@ registerCleanupFunction(function* cleanup() {
while (gBrowser.tabs.length > 1) {
yield closeTabAndToolbox(gBrowser.selectedTab);
}
// Force GC and CC to get rid of disconnected docshells and windows (see Bug 1281341).
Cu.forceGC();
Cu.forceCC();
});
/**

View File

@ -2163,6 +2163,14 @@ Toolbox.prototype = {
// to destroyed listeners to still query toolbox attributes
this._host = null;
this._toolPanels.clear();
// Force GC to prevent long GC pauses when running tests and to free up
// memory in general when the toolbox is closed.
if (flags.testing) {
win.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindowUtils)
.garbageCollect();
}
}).then(null, console.error);
let leakCheckObserver = ({wrappedJSObject: barrier}) => {