Bug 1446438 - Use exact beta version in Normandy filtering r=Gijs
authorMike Cooper <mcooper@mozilla.com>
Wed, 21 Mar 2018 10:41:04 -0700
changeset 409585 93a43f1d8ea0fa0f545e962a4b361b137fa55830
parent 409584 8f68422b3307dc910732da8f07ceb9accbc74873
child 409586 e11b86d0c8e4332b5499c74d3817d8c34727830a
push id101247
push usernerli@mozilla.com
push dateThu, 22 Mar 2018 23:00:51 +0000
treeherdermozilla-inbound@02e384bdf97d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1446438
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1446438 - Use exact beta version in Normandy filtering r=Gijs MozReview-Commit-ID: KYybykCn43O
toolkit/components/normandy/lib/ClientEnvironment.jsm
--- a/toolkit/components/normandy/lib/ClientEnvironment.jsm
+++ b/toolkit/components/normandy/lib/ClientEnvironment.jsm
@@ -15,16 +15,17 @@ ChromeUtils.defineModuleGetter(this, "Up
 ChromeUtils.defineModuleGetter(this, "NormandyApi", "resource://normandy/lib/NormandyApi.jsm");
 ChromeUtils.defineModuleGetter(
     this,
     "PreferenceExperiments",
     "resource://normandy/lib/PreferenceExperiments.jsm"
 );
 ChromeUtils.defineModuleGetter(this, "Utils", "resource://normandy/lib/Utils.jsm");
 ChromeUtils.defineModuleGetter(this, "Addons", "resource://normandy/lib/Addons.jsm");
+ChromeUtils.defineModuleGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm");
 
 const {generateUUID} = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
 
 var EXPORTED_SYMBOLS = ["ClientEnvironment"];
 
 // Cached API request for client attributes that are determined by the Normandy
 // service.
 let _classifyRequest = null;
@@ -119,17 +120,17 @@ var ClientEnvironment = {
       for (const key in mostRecentPings) {
         const ping = mostRecentPings[key];
         telemetry[ping.type] = await TelemetryArchive.promiseArchivedPingById(ping.id);
       }
       return telemetry;
     });
 
     XPCOMUtils.defineLazyGetter(environment, "version", () => {
-      return Services.appinfo.version;
+      return AppConstants.MOZ_APP_VERSION_DISPLAY;
     });
 
     XPCOMUtils.defineLazyGetter(environment, "channel", () => {
       return UpdateUtils.getUpdateChannel(false);
     });
 
     XPCOMUtils.defineLazyGetter(environment, "isDefaultBrowser", () => {
       return ShellService.isDefaultBrowser();