Bug 1539166 - Remove unused variables r=chutten
authorJan-Erik Rediger <jrediger@mozilla.com>
Fri, 05 Apr 2019 15:48:52 +0000
changeset 468190 19caa11e5eb7ab6d11ad24a998ff4de4d628c95e
parent 468189 e66a133f9624e19fc1f44eb8e84f2dc8e705cf04
child 468191 50ada71796e43e3b4c7e221687060f25539aa692
push id35822
push usershindli@mozilla.com
push dateFri, 05 Apr 2019 21:47:45 +0000
treeherdermozilla-central@98064c475d2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1539166
milestone68.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 1539166 - Remove unused variables r=chutten Depends on D26148 Differential Revision: https://phabricator.services.mozilla.com/D26149
toolkit/components/telemetry/app/TelemetryScheduler.jsm
--- a/toolkit/components/telemetry/app/TelemetryScheduler.jsm
+++ b/toolkit/components/telemetry/app/TelemetryScheduler.jsm
@@ -61,20 +61,16 @@ var Policy = {
  * Telemetry related jobs. Having a single place with this logic simplifies
  * reasoning about scheduling actions in a single place, making it easier to
  * coordinate jobs and coalesce them.
  */
 var TelemetryScheduler = {
   _lastDailyPingTime: 0,
   _lastSessionCheckpointTime: 0,
 
-  // For sanity checking.
-  _lastAdhocPingTime: 0,
-  _lastTickTime: 0,
-
   _log: null,
 
   // The timer which drives the scheduler.
   _schedulerTimer: null,
   // The interval used by the scheduler timer.
   _schedulerInterval: 0,
   _shuttingDown: true,
   _isUserIdle: false,
@@ -306,18 +302,16 @@ var TelemetryScheduler = {
    * @return {Promise} Resolved when the scheduled task completes. Only used in tests.
    */
   _schedulerTickLogic() {
     this._log.trace("_schedulerTickLogic");
 
     let nowDate = Policy.now();
     let now = nowDate.getTime();
 
-    this._lastTickTime = now;
-
     // Check if the daily ping is due.
     const shouldSendDaily = this._isDailyPingDue(nowDate);
 
     if (shouldSendDaily) {
       this._log.trace("_schedulerTickLogic - Daily ping due.");
       this._lastDailyPingTime = now;
       return TelemetrySession.sendDailyPing();
     }
@@ -344,17 +338,16 @@ var TelemetryScheduler = {
   reschedulePings(reason, competingPayload = null) {
     if (this._shuttingDown) {
       this._log.error("reschedulePings - already shutdown");
       return;
     }
 
     this._log.trace("reschedulePings - reason: " + reason);
     let now = Policy.now();
-    this._lastAdhocPingTime = now.getTime();
     if (reason == REASON_ENVIRONMENT_CHANGE) {
       // We just generated an environment-changed ping, save it as an aborted session and
       // update the schedules.
       this._saveAbortedPing(now.getTime(), competingPayload);
       // If we're close to midnight, skip today's daily ping and reschedule it for tomorrow.
       let nearestMidnight = TelemetryUtils.getNearestMidnight(now, SCHEDULER_MIDNIGHT_TOLERANCE_MS);
       if (nearestMidnight) {
         this._lastDailyPingTime = now.getTime();