add: kRDFC.Init(kBMDS, rFolder); 
context: function onOK(){  if (window.arguments[4] == "selectFolder")    window.arguments[5].selectedFolder = gCreateInFolder;  else {    const kBMDS = kRDF.GetDataSource("rdf:bookmarks");    const kBMSContractID = "@mozilla.org/browser/bookmarks-service;1";    const kBMSIID = Components.interfaces.nsIBookmarksService;    const kBMS = Components.classes[kBMSContractID].getService(kBMSIID);    var rFolder = kRDF.GetResource(gCreateInFolder, true);    const kRDFCContractID = "@mozilla.org/rdf/container;1";    const kRDFIID = Components.interfaces.nsIRDFContainer;    const kRDFC = Components.classes[kRDFCContractID].getService(kRDFIID);    try {      kRDFC.Init(kBMDS, rFolder);    }    catch (e) {      // No "NC:NewBookmarkFolder" exists, just append to the root.      rFolder = kRDF.GetResource("NC:BookmarksRoot", true);    }    if (!gFld_URL.value) return;        // Check to see if the item is a local directory path, and if so, convert    // to a file URL so that aggregation with rdf:files works    var url = gFld_URL.value;    try {      const kLFContractID = "@mozilla.org/file/local;1";      const kLFIID = Components.interfaces.nsILocalFile;      const kLF = Components.classes[kLFContractID].createInstance(kLFIID);      kLF.initWithUnicodePath(url);      url = kLF.URL;    }    catch (e) {    }        kBMS.AddBookmarkToFolder(url, rFolder, gFld_Name.value, gBookmarkCharset);      // Persist the 'show this dialog again' preference.       var checkbox = document.getElementById("dontaskagain");    const kPrefContractID = "@mozilla.org/preferences;1";    const kPrefIID = Components.interfaces.nsIPref;    const kPrefSvc = Components.classes[kPrefContractID].getService(kPrefIID);    try {      kPrefSvc.SetBoolPref("browser.bookmarks.add_without_dialog", checkbox.checked);    }    catch (e) {    }  }  close();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/8f8ee25f56f3b7656131e92a886b436476e19217/addBookmark.js/buggy/xpfe/components/bookmarks/resources/addBookmark.js