rem: observe: function(aPrefBranch, aTopic, aPrefName) { try { var rdf = Components. classes["@mozilla.org/rdf/rdf-service;1"]. getService(Components.interfaces.nsIRDFService); var ds = rdf.GetDataSource("rdf:internetsearch"); var defaultEngine = aPrefBranch.getCharPref(aPrefName); var res = rdf.GetResource(defaultEngine);   const kNC_Name = rdf.GetResource( "http: var engineName = ds.GetTarget(res, kNC_Name, true); if (engineName) { this.name = engineName.QueryInterface( Components.interfaces.nsIRDFLiteral).Value; }   const kNC_Icon = rdf.GetResource( "http: var iconURL = ds.GetTarget(res, kNC_Icon, true); if (iconURL) { this.icon = iconURL.QueryInterface( Components.interfaces.nsIRDFLiteral).Value; } } catch (ex) { } } 
add: observe: function(subject, topic, state) { if (topic != "dl-start") return; var open = gPrefService.getBoolPref("browser.download.openSidebar"); if (open && document.getElementById("sidebar-box").hidden) toggleSidebar("viewDownloadsSidebar"); } 
context:     observe: function(aPrefBranch, aTopic, aPrefName)    {        try        {            var rdf = Components.                        classes["@mozilla.org/rdf/rdf-service;1"].                        getService(Components.interfaces.nsIRDFService);            var ds = rdf.GetDataSource("rdf:internetsearch");            var defaultEngine = aPrefBranch.getCharPref(aPrefName);            var res = rdf.GetResource(defaultEngine);            // get engine ``pretty'' name            const kNC_Name = rdf.GetResource(                               "http://home.netscape.com/NC-rdf#Name");            var engineName = ds.GetTarget(res, kNC_Name, true);            if (engineName)            {                this.name = engineName.QueryInterface(                              Components.interfaces.nsIRDFLiteral).Value;            }            // get URL to engine vendor icon            const kNC_Icon = rdf.GetResource(                               "http://home.netscape.com/NC-rdf#Icon");            var iconURL = ds.GetTarget(res, kNC_Icon, true);            if (iconURL)            {                this.icon = iconURL.QueryInterface(                  Components.interfaces.nsIRDFLiteral).Value;            }        }        catch (ex)        {        }    }
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/777277e269db4f2a072f05710ef88f09caf5a041/browser.js/buggy/browser/base/content/browser.js