Bug 1302960 - Remove dead code from `PlacesSyncUtils.bookmarks.order`. r?markh
MozReview-Commit-ID: GfvjfCYI6fw
--- a/toolkit/components/places/PlacesSyncUtils.jsm
+++ b/toolkit/components/places/PlacesSyncUtils.jsm
@@ -81,21 +81,16 @@ const BookmarkSyncUtils = PlacesSyncUtil
return Promise.resolve();
}
return PlacesUtils.withConnectionWrapper("BookmarkSyncUtils: order",
Task.async(function* (db) {
let children = yield fetchAllChildren(db, parentGuid);
if (!children.length) {
return;
}
- for (let child of children) {
- // Note the current index for notifying observers. This can
- // be removed once we switch to `reorder`.
- child.oldIndex = child.index;
- }
// Reorder the list, ignoring missing children.
let delta = 0;
for (let i = 0; i < childGuids.length; ++i) {
let guid = childGuids[i];
let child = findChildByGuid(children, guid);
if (!child) {
delta++;
@@ -276,34 +271,16 @@ function updateChildIndex(children, chil
let sign = newIndex < child.index ? +1 : -1;
for (let sibling of siblings) {
sibling.index += sign;
}
child.index = newIndex;
}
-/**
- * Sends a bookmarks notification through the given observers.
- *
- * @param observers
- * array of nsINavBookmarkObserver objects.
- * @param notification
- * the notification name.
- * @param args
- * array of arguments to pass to the notification.
- */
-function notify(observers, notification, args) {
- for (let observer of observers) {
- try {
- observer[notification](...args);
- } catch (ex) {}
- }
-}
-
// A helper for whenever we want to know if a GUID doesn't exist in the places
// database. Primarily used to detect orphans on incoming records.
var GUIDMissing = Task.async(function* (guid) {
try {
yield PlacesUtils.promiseItemId(guid);
return false;
} catch (ex) {
if (ex.message == "no item found for the given GUID") {