rem:   if (aTxnType == "newbookmark") { selection.type[0] = "Bookmark"; selection.isImmutable[0] = false; selection.containsImmutable = false; } var ok        = BookmarksUtils.insertSelection(aTxnType, selection, aTarget); 
add: var ok        = BookmarksUtils.insertAndCheckSelection(aTxnType, selection, aTarget); 
context:   createNewResource: function(aResource, aTarget, aTxnType)  {    var selection = BookmarksUtils.getSelectionFromResource(aResource, aTarget.parent);    // XXXpch: ugly ugly ugly temporary hack, getsynthesizeType says a bookmark    // is not a bookmark when it's not a child of sth.    if (aTxnType == "newbookmark") {      selection.type[0] = "Bookmark";      selection.isImmutable[0] = false;      selection.containsImmutable = false;    }    var ok        = BookmarksUtils.insertSelection(aTxnType, selection, aTarget);    if (ok) {      var propWin = this.openBookmarkProperties(selection);            function canceledNewResource()      {        BookmarksCommand.deleteBookmark(selection);        propWin.document.documentElement.removeEventListener("dialogcancel", canceledNewResource, false);        propWin.removeEventListener("load", propertiesWindowLoad, false);      }            function propertiesWindowLoad()      {        propWin.document.documentElement.addEventListener("dialogcancel", canceledNewResource, false);      }      propWin.addEventListener("load", propertiesWindowLoad, false);    }  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/deb907dede6accfbec295282501589d13a5b1c23/bookmarks.js/buggy/browser/components/bookmarks/content/bookmarks.js