Bug 1364075 - remove DevTools dependency in ContentProcessSingleton;r=ochameau

MozReview-Commit-ID: 38XKKM37jC5
This commit is contained in:
Julian Descottes
2017-05-29 23:36:26 +02:00
parent c116e065e2
commit ff793517de
5 changed files with 59 additions and 12 deletions

View File

@@ -49,7 +49,6 @@ ContentProcessSingleton.prototype = {
case "app-startup": {
Services.obs.addObserver(this, "console-api-log-event");
Services.obs.addObserver(this, "xpcom-shutdown");
cpmm.addMessageListener("DevTools:InitDebuggerServer", this);
TelemetryController.observe(null, topic, null);
break;
}
@@ -103,19 +102,9 @@ ContentProcessSingleton.prototype = {
case "xpcom-shutdown":
Services.obs.removeObserver(this, "console-api-log-event");
Services.obs.removeObserver(this, "xpcom-shutdown");
cpmm.removeMessageListener("DevTools:InitDebuggerServer", this);
break;
}
},
receiveMessage(message) {
// load devtools component on-demand
// Only reply if we are in a real content process
if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
let {init} = Cu.import("resource://devtools/server/content-server.jsm", {});
init(message);
}
},
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([ContentProcessSingleton]);