When we try to add new bookmark to the empty folder
via method addBookmark(BookmarkEntry mayBeNullParent, BookmarkEntry bookmark) of
Bookmarks interface, then we just got "ASSERTION: illegal value 'aIndex>=1'" and
Supposed reason: RDF containers are one-indexed(elements numbered 1,2,3.. but
not a 0,1,2 ..). But in BookmarksImpl.java we are use childCount value as a
lastChildIndex and in case of empty folder this value is equals to 0, and then
try to insert new bookmark at this position.
This bug is reproduced on Mozilla M16 and webclient sources from July,07 2000
Adding Status white board keyword to track all existing Webclient bugs
Created attachment 20321 [details]
tar.gz Fix for this bug, first iteration
This fix enables the adding of bookmarks and bookmark folders.
* Due to the vagaries of the mozilla RDF implementation, folders and
* bookmark entries are handled differently. For Folders, we don't
* create a nativeRDFNode at the outset. Rather, we just create the
* properties table and stock it with the known keys, then wait for the
* nativeRDFNode to be created en addBookmark.
* The adding of bookmark folders is done through the RDF DoCommand
* interface. The DoCommand interface creates the nsIRDFResource on
* your behalf. We use an nsIRDFObserver to obtain the created resource
* as the DoCommand executes.
Created attachment 20356 [details]
tar.gz fix for this bug, second iteration: works on solaris, has comments.
Fix checked in.
Verified with : mozilla branch Netscape61_RELEASE and blackwood branch
JAVADEV_6_1_20010831 under Win NT 4.0.
I can correctly insert first item to bookmark folder.