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 nothing more. 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
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. A src_moz/wsRDFObserver.cpp A src_moz/wsRDFObserver.h M classes_spec/org/mozilla/webclient/BookmarkEntry.java M classes_spec/org/mozilla/webclient/test/EMWindow.java M classes_spec/org/mozilla/webclient/wrapper_native/BookmarkEntryImpl.java M classes_spec/org/mozilla/webclient/wrapper_native/BookmarksImpl.java M classes_spec/org/mozilla/webclient/wrapper_native/RDFTreeNode.java M src_moz/Makefile.win M src_moz/Makefile.in M src_moz/RDFActionEvents.cpp M src_moz/RDFActionEvents.h M src_moz/RDFTreeNode.cpp M src_moz/rdf_util.cpp M src_moz/rdf_util.h M src_moz/motif/NativeLoaderStub.cpp M src_share/jni_util.cpp M src_share/jni_util.h
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.