Bug 1146054 - browser now reports a prolonged readinglist sync error after the correct time. r=adw
authorMark Hammond <mhammond@skippinet.com.au>
Tue, 24 Mar 2015 10:28:14 +1100
changeset 235351 cb3c08dcccf6d8fdef1e10fb89bcc902f222b9a3
parent 235350 cd9dda8f4cc186556e985b8afc9b615a8f075699
child 235352 56ce9fdb62e3d166dada53e38d1a043bc87036db
push id57400
push userryanvm@gmail.com
push dateTue, 24 Mar 2015 15:59:13 +0000
treeherdermozilla-inbound@47fa87252df0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1146054
milestone39.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 1146054 - browser now reports a prolonged readinglist sync error after the correct time. r=adw
browser/base/content/browser-syncui.js
--- a/browser/base/content/browser-syncui.js
+++ b/browser/base/content/browser-syncui.js
@@ -452,17 +452,17 @@ let gSyncUI = {
 
   // Return true if the reading-list is in a "prolonged" error state. That
   // engine doesn't impose what that means, so calculate it here. For
   // consistency, we just use the sync prefs.
   isProlongedReadingListError() {
     let lastSync, threshold, prolonged;
     try {
       lastSync = new Date(Services.prefs.getCharPref("readinglist.scheduler.lastSync"));
-      threshold = new Date(Date.now() - Services.prefs.getIntPref("services.sync.errorhandler.networkFailureReportTimeout"));
+      threshold = new Date(Date.now() - Services.prefs.getIntPref("services.sync.errorhandler.networkFailureReportTimeout") * 1000);
       prolonged = lastSync <= threshold;
     } catch (ex) {
       // no pref, assume not prolonged.
       prolonged = false;
     }
     this.log.debug("isProlongedReadingListError has last successful sync at ${lastSync}, threshold is ${threshold}, prolonged=${prolonged}",
                    {lastSync, threshold, prolonged});
     return prolonged;