B2G/gecko/browser/components/places/content/editBookmarkOverlay.js
/**
   * Get the corresponding menu-item in the folder-menu-list for a bookmarks
   * folder if such an item exists. Otherwise, this creates a menu-item for the
   * folder. If the items-count limit (see MAX_FOLDERS_IN_MENU_LIST) is reached,
   * the new item replaces the last menu-item.
   * @param aFolderId
   *        The identifier of the bookmarks folder.
   */
Get the corresponding menu-item in the folder-menu-list for a bookmarks
folder if such an item exists. Otherwise, this creates a menu-item for the
folder. If the items-count limit  is reached,
the new item replaces the last menu-item.
@param aFolderId
The identifier of the bookmarks folder.
Get the corresponding menu - item in the folder - menu - list for a bookmarks folder if such an item exists . Otherwise this creates a menu - item for the folder . If the items - count limit is reached the new item replaces the last menu - item . @param aFolderId The identifier of the bookmarks folder .
function EIO__getFolderMenuItem(aFolderId) {
    var menupopup = this._folderMenuList.menupopup;
    for (let i = 0; i < menupopup.childNodes.length; i++) {
      if ("folderId" in menupopup.childNodes[i] &&
          menupopup.childNodes[i].folderId == aFolderId)
        return menupopup.childNodes[i];
    }
    if (menupopup.childNodes.length == 4 + MAX_FOLDER_ITEM_IN_MENU_LIST)
      menupopup.removeChild(menupopup.lastChild);
    return this._appendFolderItemToMenupopup(menupopup, aFolderId);
  }
function EIO__getFolderMenuItem ( aFolderId ) { var menupopup = this . _folderMenuList . menupopup ; for ( let i = 0 ; i < menupopup . childNodes . length ; i ++ ) { if ( "folderId" in menupopup . childNodes [ i ] && menupopup . childNodes [ i ] . folderId == aFolderId ) return menupopup . childNodes [ i ] ; } if ( menupopup . childNodes . length == 4 + MAX_FOLDER_ITEM_IN_MENU_LIST ) menupopup . removeChild ( menupopup . lastChild ) ; return this . _appendFolderItemToMenupopup ( menupopup , aFolderId ) ; }
Get the corresponding menu-item in the folder-menu-list for a bookmarks
 folder if such an item exists.
Get the corresponding menu - item in the folder - menu - list for a bookmarks folder if such an item exists .
// 3 special folders + separator + folder-items-count limit