Bug 1154902 - Don't gather profile data in Telemetry on Android devices. r=gfritzsche,a=lmandel
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Mon, 20 Apr 2015 14:03:29 +0200
changeset 267224 625de3552971c50bc348b85267db0b06b233992e
parent 267223 17f73d964965d84870ed239f3818c72b833c699f
child 267225 7dee328009b7f099d7cf77c36eb5a31cb04c177b
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgfritzsche, lmandel
bugs1154902
milestone39.0a2
Bug 1154902 - Don't gather profile data in Telemetry on Android devices. r=gfritzsche,a=lmandel
toolkit/components/telemetry/TelemetryEnvironment.jsm
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -647,36 +647,38 @@ function EnvironmentCache() {
   this._currentEnvironment = {
     build: this._getBuild(),
     partner: this._getPartner(),
     system: this._getSystem(),
   };
 
   this._updateSettings();
 
-#ifndef MOZ_WIDGET_ANDROID
-  this._currentEnvironment.profile = {};
-#endif
-
   // Build the remaining asynchronous parts of the environment. Don't register change listeners
   // until the initial environment has been built.
 
   this._addonBuilder = new EnvironmentAddonBuilder(this);
 
-  this._initTask = Promise.all([this._addonBuilder.init(), this._updateProfile()])
+  let p = [ this._addonBuilder.init() ];
+#ifndef MOZ_WIDGET_ANDROID
+  this._currentEnvironment.profile = {};
+  p.push(this._updateProfile());
+#endif
+
+  this._initTask = Promise.all(p)
     .then(
       () => {
         this._initTask = null;
         this._startWatchingPrefs();
         this._addonBuilder.watchForChanges();
         return this.currentEnvironment;
       },
       (err) => {
         // log errors but eat them for consumers
-        this._log.error("error while initializing", err);
+        this._log.error("EnvironmentCache - error while initializing", err);
         this._initTask = null;
         this._startWatchingPrefs();
         this._addonBuilder.watchForChanges();
         return this.currentEnvironment;
       });
 }
 EnvironmentCache.prototype = {
   /**