Bug 1262329 - don't log that Sync encountered an error writing previousFailed when there was no error. r=rnewman
authorMark Hammond <mhammond@skippinet.com.au>
Tue, 05 Apr 2016 19:10:26 -0700
changeset 291635 057006b7317699c8c96167091ea5d0cd3e16078a
parent 291634 6ae9eb6d8dca4ef55d7f1af0e7a945fbedf4b7fa
child 291636 0944b6e52af61d0135d2887578cc6d5aee7d0d62
push id18547
push userkcambridge@mozilla.com
push dateWed, 06 Apr 2016 02:16:58 +0000
treeherderfx-team@057006b73176 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs1262329
milestone48.0a1
Bug 1262329 - don't log that Sync encountered an error writing previousFailed when there was no error. r=rnewman MozReview-Commit-ID: 1VlcsvrPDUo
services/sync/modules/engines.js
--- a/services/sync/modules/engines.js
+++ b/services/sync/modules/engines.js
@@ -809,17 +809,23 @@ SyncEngine.prototype = {
       }
     });
   },
 
   get previousFailed() {
     return this._previousFailed;
   },
   set previousFailed(val) {
-    let cb = (error) => this._log.error("Failed to set previousFailed", error);
+    let cb = (error) => {
+      if (error) {
+        this._log.error("Failed to set previousFailed", error);
+      } else {
+        this._log.debug("Successfully wrote previousFailed.");
+      }
+    }
     // Coerce the array to a string for more efficient comparison.
     if (val + "" == this._previousFailed) {
       return;
     }
     this._previousFailed = val;
     Utils.namedTimer(function () {
       Utils.jsonSave("failed/" + this.name, this, val, cb);
     }, 0, this, "_previousFailedDelay");