Bug 1361818 - Make sure TPS is aware sync's collection.get method is asynchronous now r=markh
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Wed, 03 May 2017 15:12:30 -0400
changeset 356512 23952514736547bcb672049648d2814e76806723
parent 356511 8db3ccba8b512f529206fe6ccf98fa56f55f1f94
child 356513 8ff81b6fdfb83c1942fd70b645f5926340c22bb7
push id31767
push usercbook@mozilla.com
push dateFri, 05 May 2017 13:15:58 +0000
treeherdermozilla-central@8872ad4d52b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1361818
milestone55.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 1361818 - Make sure TPS is aware sync's collection.get method is asynchronous now r=markh Ideally we'd convert this to promises, but this function is already full of promiseSpinningly's and removing them all is too much work for this bug. MozReview-Commit-ID: 144JFRwejTb
services/sync/tps/extensions/tps/resource/tps.jsm
--- a/services/sync/tps/extensions/tps/resource/tps.jsm
+++ b/services/sync/tps/extensions/tps/resource/tps.jsm
@@ -619,17 +619,17 @@ var TPS = {
       let collection = bookmarkEngine.itemSource();
       let collectionKey = bookmarkEngine.service.collectionKeys.keyForCollection(bookmarkEngine.name);
       collection.full = true;
       let items = [];
       collection.recordHandler = function(item) {
         item.decrypt(collectionKey);
         items.push(item.cleartext);
       };
-      collection.get();
+      Async.promiseSpinningly(collection.get());
       return items;
     };
     let serverRecordDumpStr;
     try {
       Logger.logInfo("About to perform bookmark validation");
       let clientTree = Async.promiseSpinningly(PlacesUtils.promiseBookmarksTree("", {
         includeItemIds: true
       }));