Bug 1395990 - use constant MOZILLA_OFFICIAL to check for local build in ToolboxProcess.jsm;r=bgrins draft
authorJulian Descottes <jdescottes@mozilla.com>
Fri, 01 Sep 2017 18:28:08 +0200
changeset 657538 df0edc41273329bcfb8e5fccdcdb183380953331
parent 657343 a3585c77e2b1bc5f5fea907e97762f7b47a12033
child 657583 296c7817ba808f472d393d9bd0594712c947eb5d
child 657597 aa6f33da65c308d0eab511c36f60fa6aa0464830
push id77554
push userjdescottes@mozilla.com
push dateFri, 01 Sep 2017 16:28:40 +0000
reviewersbgrins
bugs1395990
milestone57.0a1
Bug 1395990 - use constant MOZILLA_OFFICIAL to check for local build in ToolboxProcess.jsm;r=bgrins MozReview-Commit-ID: mzBOBwruL9
devtools/client/framework/ToolboxProcess.jsm
--- 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: {