Bug 1440804 - Fix unused variables in `PlacesSyncUtils`. r?standard8
MozReview-Commit-ID: 2h1R48JUsyN
--- a/toolkit/components/places/PlacesSyncUtils.jsm
+++ b/toolkit/components/places/PlacesSyncUtils.jsm
@@ -70,17 +70,17 @@ XPCOMUtils.defineLazyGetter(this, "ROOT_
[PlacesUtils.bookmarks.unfiledGuid]: "unfiled",
[PlacesUtils.bookmarks.mobileGuid]: "mobile",
}));
XPCOMUtils.defineLazyGetter(this, "ROOTS", () =>
Object.keys(ROOT_RECORD_ID_TO_GUID)
);
-const HistorySyncUtils = PlacesSyncUtils.history = Object.freeze({
+PlacesSyncUtils.history = Object.freeze({
/**
* Clamps a history visit date between the current date and the earliest
* sensible date.
*
* @param {Date} visitDate
* The visit date.
* @return {Date} The clamped visit date.
*/
@@ -605,21 +605,18 @@ const BookmarkSyncUtils = PlacesSyncUtil
UPDATE moz_bookmarks
SET syncChangeCounter = MAX(syncChangeCounter - :syncChangeDelta, 0),
syncStatus = :syncStatus
WHERE guid = :guid`,
updateParams);
// Unconditionally delete tombstones, in case the GUID exists in
// `moz_bookmarks` and `moz_bookmarks_deleted` (bug 1405563).
- let deleteParams = updateParams.map(({ guid }) => ({ guid }));
- await db.executeCached(`
- DELETE FROM moz_bookmarks_deleted
- WHERE guid = :guid`,
- deleteParams);
+ let tombstoneGuidsToRemove = updateParams.map(({ guid }) => guid);
+ await removeTombstones(db, tombstoneGuidsToRemove);
});
}
BookmarkSyncLog.debug(`pushChanges: Processed change records`,
{ weak: weakCount,
skipped: skippedCount,
updated: updateParams.length });
}