rem: var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService); var prefbranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); var ds = rdf.GetDataSource("rdf:internetsearch"); var kNC_Name = rdf.GetResource("http: try { var defaultEngine = prefbranch.getCharPref("browser.search.defaultengine"); } catch(ex) { ensureDefaultEnginePrefs(rdf, ds); defaultEngine = prefbranch.getCharPref("browser.search.defaultengine"); } } 
add: try { defaultEngine = prefbranch.getCharPref("browser.search.defaultengine"); } catch(ex) { ensureDefaultEnginePrefs(rdf, ds); defaultEngine = prefbranch.getCharPref("browser.search.defaultengine"); } } 
context: function ensureSearchPref() {      var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);   var prefbranch = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);   var ds = rdf.GetDataSource("rdf:internetsearch");   var kNC_Name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name");   try {        var defaultEngine = prefbranch.getCharPref("browser.search.defaultengine");        } catch(ex) {            ensureDefaultEnginePrefs(rdf, ds);            defaultEngine = prefbranch.getCharPref("browser.search.defaultengine");        }   }
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/b88e7d2af702b244600d4c69d1ea968d9cf100ec/search-panel.js/clean/xpfe/components/search/resources/search-panel.js