Bug 1395990 - use constant MOZILLA_OFFICIAL to check for local build in ToolboxProcess.jsm;r=bgrins
MozReview-Commit-ID: mzBOBwruL9
--- a/devtools/client/framework/ToolboxProcess.jsm
+++ b/devtools/client/framework/ToolboxProcess.jsm
@@ -16,16 +16,19 @@ const { XPCOMUtils } = require("resource
XPCOMUtils.defineLazyModuleGetter(this, "Subprocess", "resource://gre/modules/Subprocess.jsm");
XPCOMUtils.defineLazyGetter(this, "Telemetry", function () {
return require("devtools/client/shared/telemetry");
});
XPCOMUtils.defineLazyGetter(this, "EventEmitter", function () {
return require("devtools/shared/old-event-emitter");
});
+XPCOMUtils.defineLazyGetter(this, "system", function () {
+ return require("devtools/shared/system");
+});
const promise = require("promise");
const Services = require("Services");
this.EXPORTED_SYMBOLS = ["BrowserToolboxProcess"];
var processes = new Set();
/**
@@ -260,17 +263,17 @@ BrowserToolboxProcess.prototype = {
// During local development, incremental builds can trigger the main process
// to clear its startup cache with the "flag file" .purgecaches, but this
// file is removed during app startup time, so we aren't able to know if it
// was present in order to also clear the child profile's startup cache as
// well.
//
// As an approximation of "isLocalBuild", check for an unofficial build.
- if (!Services.appinfo.isOfficial) {
+ if (!system.constants.MOZILLA_OFFICIAL) {
args.push("-purgecaches");
}
this._dbgProcessPromise = Subprocess.call({
command,
arguments: args,
environmentAppend: true,
environment: {