rem: const kPrefSvcContractID = "@mozilla.org/preferences;1"; const kPrefSvcIID = Components.interfaces.nsIPref; 
add: const kPrefSvcContractID = "@mozilla.org/preferences-service;1"; const kPrefSvcIID = Components.interfaces.nsIPrefBranch; 
context:   deleteSelection: function (aSelection)  {    const kRDFCContractID = "@mozilla.org/rdf/container;1";    const kRDFCIID = Components.interfaces.nsIRDFContainer;    const ksRDFC = Components.classes[kRDFCContractID].getService(kRDFCIID);    var nextElement;    var count = 0;    var selectionLength = aSelection.length;    while (aSelection.length && aSelection[count]) {      const currParent = this.findRDFNode(aSelection[count], false);      const kSelectionURI = NODE_ID(aSelection[count]);      // Disallow the removal of certain 'special' nodes      if (kSelectionURI == "NC:BookmarksRoot") {        aSelection.splice(count++,1);        continue;      }      // If the current bookmark is the IE Favorites folder, we have a little      // extra work to do - set the pref |browser.bookmarks.import_system_favorites|      // to ensure that we don't re-import next time.       if (aSelection[count].getAttribute("type") == (NC_NS + "IEFavoriteFolder")) {        const kPrefSvcContractID = "@mozilla.org/preferences;1";        const kPrefSvcIID = Components.interfaces.nsIPref;        const kPrefSvc = Components.classes[kPrefSvcContractID].getService(kPrefSvcIID);        kPrefSvc.SetBoolPref("browser.bookmarks.import_system_favorites", false);      }              const krParent = this.RDF.GetResource(NODE_ID(currParent));      const krBookmark = this.RDF.GetResource(kSelectionURI);      const kBMDS = this.RDF.GetDataSource("rdf:bookmarks");      ksRDFC.Init(kBMDS, krParent);      nextElement = this.getNextElement(aSelection[count]);      ksRDFC.RemoveElement(krBookmark, true);      try {        // XXX - UGH. Template builder is NOT removing the element from the        //       tree, and so selection remains non-zero in length and we go into        //       an infinite loop here. Tear the node out of the document.         var parent = aSelection[count].parentNode;        parent.removeChild(aSelection[count]);      }      catch (e) {      }      // Manipulate the selection array ourselves.       aSelection.splice(count,1);    }    this.selectElement(nextElement);  },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/faf03ce445712b372523f881cc3144cfadc7a611/bookmarksOverlay.js/buggy/xpfe/components/bookmarks/resources/bookmarksOverlay.js