Bug 1605881 - have Sync not send batch notifications to places to avoid spurious bookmark moves. r=lina

Differential Revision: https://phabricator.services.mozilla.com/D62668

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mark Hammond 2020-02-17 15:35:13 +00:00
parent ac03179b09
commit abd34a6793

View File

@ -2408,9 +2408,9 @@ class BookmarkObserverRecorder {
async notifyBookmarkObservers() {
MirrorLog.trace("Notifying bookmark observers");
let observers = PlacesUtils.bookmarks.getObservers();
for (let observer of observers) {
this.notifyObserver(observer, "onBeginUpdateBatch");
}
// ideally we'd send `onBeginUpdateBatch` here (and `onEndUpdateBatch` at
// the end) to all observers, but batching is somewhat broken currently.
// See bug 1605881 for all the gory details...
await Async.yieldingForEach(
this.guidChangedArgs,
args => {
@ -2462,9 +2462,7 @@ class BookmarkObserverRecorder {
},
yieldState
);
for (let observer of observers) {
this.notifyObserver(observer, "onEndUpdateBatch");
}
MirrorLog.trace("Notified bookmark observers");
}
notifyObserversWithInfo(observers, name, info) {