Bug 1439220 - Port Bug 1437040 "Remove synchronous Bookmarks::GetItemIndex" to SeaMonkey. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Mon, 07 May 2018 12:41:29 +0200
changeset 31464 6320dec21ce6
parent 31463 dc4acdaa5df1
child 31465 faa0beaa7193
push id383
push userclokep@gmail.com
push date2018-05-07 21:52 +0000
reviewersIanN, IanN
bugs1439220, 1437040
Bug 1439220 - Port Bug 1437040 "Remove synchronous Bookmarks::GetItemIndex" to SeaMonkey. r=IanN a=IanN Places part.
suite/common/places/PlacesUIUtils.jsm
--- a/suite/common/places/PlacesUIUtils.jsm
+++ b/suite/common/places/PlacesUIUtils.jsm
@@ -880,18 +880,18 @@ this.PlacesUIUtils = {
         // This will throw if the annotation is an orphan.
         bs.removeItem(aItemId);
       } catch (e) { /* orphan anno */ }
     }
 
     // Returns true if item really exists, false otherwise.
     function itemExists(aItemId) {
       try {
-        let index = bs.getItemIndex(aItemId);
-        return index > -1;
+        bs.getFolderIdForItem(aItemId);
+        return true;
       } catch (e) {
         return false;
       }
     }
 
     // Get all items marked as being the left pane folder.
     let items = as.getItemsWithAnnotation(this.ORGANIZER_FOLDER_ANNO);
     if (items.length > 1) {