Closed Bug 1395990 Opened 3 years ago Closed 3 years ago

Pass "-purgecaches" arg when creating chrome debugging process for artifact builds


(DevTools :: General, enhancement, P3)



(firefox57 fixed)

Firefox 57
Tracking Status
firefox57 --- fixed


(Reporter: jdescottes, Assigned: jdescottes)



(3 files)

We are currently relying on Services.appinfo.isOfficial in order to add -purgeCaches to the arguments passed to the chrome debugging process at:

However Services.appinfo.isOfficial is only false for non-artifact builds. Artifact builds actually have it set to true since they are based on a CI-built artifact.

We could rely on the following combination of constants to get a better approximation:

> let isOfficialBuild = AppConstants.NIGHTLY_BUILD ||
>                       AppConstants.RELEASE_OR_BETA ||
>                       AppConstants.MOZ_DEV_EDITION;
Actually this other version fails in the same way. Looks like we have to use: 

> const IS_UNOFFICIAL_BUILD = Services.prefs.getStringPref("") === "default";

to get something that can be used for both artifact and non artifact builds.
We use `#ifndef MOZILLA_OFFICIAL` for turning on the remote debugging prefs in local builds, which works in artifact builds:
So should be AppConstants.MOZILLA_OFFICIAL
Comment on attachment 8903660 [details]
Bug 1395990 - use constant MOZILLA_OFFICIAL to check for local build in ToolboxProcess.jsm;
Attachment #8903660 - Flags: review?(bgrinstead) → review+
With this change it looks like there is only one other usage of "Services.appinfo.isOfficial" (in a test): Mossop, can that property go away?
Flags: needinfo?(dtownsend)
Assignee: nobody → jdescottes
(thanks for jumping on this and the review Brian!)
(In reply to Brian Grinstead [:bgrins] from comment #6)
> With this change it looks like there is only one other usage of
> "Services.appinfo.isOfficial" (in a test):
> isOfficial%22&redirect=false. Mossop, can that property go away?

Yes, we should use AppConstants.MOZILLA_OFFICIAL instead.
Flags: needinfo?(dtownsend)
Attachment #8903675 - Flags: review?(dtownsend)
Attachment #8903676 - Flags: review?(dtownsend)
Comment on attachment 8903675 [details]
Bug 1395990 - stop using Services.appinfo.isOfficial in test_TelemetrySession.js;
Attachment #8903675 - Flags: review?(dtownsend) → review+
Comment on attachment 8903676 [details]
Bug 1395990 - remove Services.appinfo.isOfficial;
Attachment #8903676 - Flags: review?(dtownsend) → review+
Pushed by
use constant MOZILLA_OFFICIAL to check for local build in ToolboxProcess.jsm;r=bgrins
stop using Services.appinfo.isOfficial in test_TelemetrySession.js;r=mossop
remove Services.appinfo.isOfficial;r=mossop
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.