Bug 1166853 - Sync "hangs" when trying to apply a livemark to a reconciled folder. r=rnewman, a=sledru
authorMarco Bonardo <mbonardo@mozilla.com>
Fri, 22 May 2015 19:02:44 +0200
changeset 266101 34df9b9beee3
parent 266100 ce664a21fda4
child 266102 8b33b6374feb
push id4754
push userryanvm@gmail.com
push date2015-05-25 15:15 +0000
treeherdermozilla-beta@8b33b6374feb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman, sledru
bugs1166853
milestone39.0
Bug 1166853 - Sync "hangs" when trying to apply a livemark to a reconciled folder. r=rnewman, a=sledru
services/sync/modules/engines/bookmarks.js
--- a/services/sync/modules/engines/bookmarks.js
+++ b/services/sync/modules/engines/bookmarks.js
@@ -754,17 +754,20 @@ BookmarksStore.prototype = {
       let livemarkObj = {title: record.title,
                          parentId: record._parent,
                          index: PlacesUtils.bookmarks.DEFAULT_INDEX,
                          feedURI: Utils.makeURI(record.feedUri),
                          siteURI: siteURI,
                          guid: record.id};
       PlacesUtils.livemarks.addLivemark(livemarkObj).then(
         aLivemark => { spinningCb(null, [Components.results.NS_OK, aLivemark]) },
-        () => { spinningCb(null, [Components.results.NS_ERROR_UNEXPECTED, aLivemark]) }
+        ex => {
+          this._log.error("creating livemark failed: " + ex);
+          spinningCb(null, [Components.results.NS_ERROR_UNEXPECTED, null])
+        }
       );
 
       let [status, livemark] = spinningCb.wait();
       if (!Components.isSuccessCode(status)) {
         throw status;
       }
 
       this._log.debug("Created livemark " + livemark.id + " under " +