зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1139021 - Don't run extra collections in the parent process for the mochitest window leak detector. r=jmaher
This commit is contained in:
Родитель
76ce9ce1fc
Коммит
4ffb27571d
|
@ -17,6 +17,12 @@ this.EXPORTED_SYMBOLS = ["ContentCollector"];
|
||||||
|
|
||||||
var ContentCollector = {
|
var ContentCollector = {
|
||||||
init: function() {
|
init: function() {
|
||||||
|
let processType = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).processType;
|
||||||
|
if (processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {
|
||||||
|
// In the main process, we handle triggering collections in browser-test.js
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
|
let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
|
||||||
.getService(Ci.nsISyncMessageSender);
|
.getService(Ci.nsISyncMessageSender);
|
||||||
cpmm.addMessageListener("browser-test:collect-request", this);
|
cpmm.addMessageListener("browser-test:collect-request", this);
|
||||||
|
|
|
@ -291,6 +291,11 @@ Tester.prototype = {
|
||||||
Services.obs.removeObserver(this, "content-document-global-created");
|
Services.obs.removeObserver(this, "content-document-global-created");
|
||||||
this.Promise.Debugging.clearUncaughtErrorObservers();
|
this.Promise.Debugging.clearUncaughtErrorObservers();
|
||||||
this._treatUncaughtRejectionsAsFailures = false;
|
this._treatUncaughtRejectionsAsFailures = false;
|
||||||
|
|
||||||
|
// In the main process, we print the ShutdownLeaksCollector message here.
|
||||||
|
let pid = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).processID;
|
||||||
|
dump("Completed ShutdownLeaks collections in process " + pid + "\n");
|
||||||
|
|
||||||
this.dumper.structuredLogger.info("TEST-START | Shutdown");
|
this.dumper.structuredLogger.info("TEST-START | Shutdown");
|
||||||
|
|
||||||
if (this.tests.length) {
|
if (this.tests.length) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче