Bug 1468026 - Rename MarionetteMainProcess to MarionetteParentProcess. r?whimboo
The "parent process" terminology is already established in the
parent process message manager. This aligns the Marionette component
with this terminology.
MozReview-Commit-ID: 12z1M5jAWDa
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -263,17 +263,17 @@ const RECOMMENDED_PREFS = new Map([
// Prevent starting into safe mode after application crashes
["toolkit.startup.max_resumed_crashes", -1],
]);
const isRemote = Services.appinfo.processType ==
Services.appinfo.PROCESS_TYPE_CONTENT;
-class MarionetteMainProcess {
+class MarionetteParentProcess {
constructor() {
this.server = null;
// holds reference to ChromeWindow
// used to run GFX sanity tests on Windows
this.gfxWindow = null;
// indicates that all pending window checks have been completed
@@ -303,17 +303,17 @@ class MarionetteMainProcess {
}
receiveMessage({name}) {
switch (name) {
case "Marionette:IsRunning":
return this.running;
default:
- log.warn("Unknown IPC message to main process: " + name);
+ log.warn("Unknown IPC message to parent process: " + name);
return null;
}
}
observe(subject, topic) {
log.debug(`Received observer notification ${topic}`);
switch (topic) {
@@ -480,17 +480,17 @@ class MarionetteMainProcess {
]);
}
}
class MarionetteContentProcess {
get running() {
let reply = Services.cpmm.sendSyncMessage("Marionette:IsRunning");
if (reply.length == 0) {
- log.warn("No reply from main process");
+ log.warn("No reply from parent process");
return false;
}
return reply[0];
}
get QueryInterface() {
return ChromeUtils.generateQI([Ci.nsIMarionette]);
}
@@ -503,17 +503,17 @@ const MarionetteFactory = {
if (outer) {
throw Cr.NS_ERROR_NO_AGGREGATION;
}
if (!this.instance_) {
if (isRemote) {
this.instance_ = new MarionetteContentProcess();
} else {
- this.instance_ = new MarionetteMainProcess();
+ this.instance_ = new MarionetteParentProcess();
}
}
return this.instance_.QueryInterface(iid);
},
};
function Marionette() {}
--- a/testing/marionette/listener.js
+++ b/testing/marionette/listener.js
@@ -74,17 +74,17 @@ Object.defineProperty(this, "capabilitie
});
let legacyactions = new legacyaction.Chain();
// last touch for each fingerId
let multiLast = {};
// TODO: Log.jsm is not e10s compatible (see https://bugzil.la/1411513),
-// query the main process for the current log level
+// query the parent process for the current log level
const logger = Log.repository.getLogger("Marionette");
if (logger.ownAppenders.length == 0) {
let log = Services.cpmm.initialProcessData["Marionette:Log"];
logger.level = log.level;
logger.addAppender(new Log.DumpAppender());
}
// sandbox storage and name of the current sandbox