Bug 1152703 - Prevent desktop reading list sync errors from preventing sync from starting again. r=adw, a=sledru
authorMark Hammond <mhammond@skippinet.com.au>
Thu, 09 Apr 2015 19:49:18 +1000
changeset 258442 8191b45753c7
parent 258441 002faed66e96
child 258443 0a9b3f3e962d
push id4669
push userryanvm@gmail.com
push date2015-04-13 16:55 +0000
treeherdermozilla-beta@333017ad43a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw, sledru
bugs1152703
milestone38.0
Bug 1152703 - Prevent desktop reading list sync errors from preventing sync from starting again. r=adw, a=sledru
browser/components/readinglist/Sync.jsm
--- a/browser/components/readinglist/Sync.jsm
+++ b/browser/components/readinglist/Sync.jsm
@@ -113,18 +113,21 @@ SyncImpl.prototype = {
    * Starts sync, if it's not already started.
    *
    * @return Promise<null> this.promise, i.e., a promise that will be resolved
    *         when sync completes, rejected on error.
    */
   start() {
     if (!this.promise) {
       this.promise = Task.spawn(function* () {
-        yield this._start();
-        delete this.promise;
+        try {
+          yield this._start();
+        } finally {
+          delete this.promise;
+        }
       }.bind(this));
     }
     return this.promise;
   },
 
   /**
    * A Promise<null> that will be non-null when sync is ongoing.  Resolved when
    * sync completes, rejected on error.