rem: var RDF = Components.classes["component: if (RDF)    RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); 
add: var RDF = Components.classes[RDFSERVICE_PROGID].getService(); if (RDF)    RDF = RDF.QueryInterface(nsIRDFService); 
context: function Init(){    debug("directory.js: Init()\n");    var tree = document.getElementById('tree');    // Initialize the tree's base URL to whatever the HTTPIndex is rooted at    var baseURI = HTTPIndex.BaseURL;    if (baseURI && (baseURI.indexOf("ftp://") == 0))    {        // fix bug # 37102: if its a FTP directory        // ensure it ends with a trailing slash    	if (baseURI.substr(baseURI.length - 1) != "/")    	{        	debug("append traiing slash to FTP directory URL\n");        	baseURI += "/";        }        // Note: DON'T add the HTTPIndex datasource into the tree        // for file URLs, only do it for FTP URLs; the "rdf:files"        // datasources handles file URLs        tree.database.AddDataSource(HTTPIndex.DataSource);    }    // Note: set encoding BEFORE setting "ref" (important!)    var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService();    if (RDF)    RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);    if (RDF)    {        var httpDS = HTTPIndex.DataSource;        if (httpDS) httpDS = httpDS.QueryInterface(Components.interfaces.nsIHTTPIndex);        if (httpDS)        {            httpDS.encoding = "ISO-8859-1";            // Use a default character set.            if (window._content.defaultCharacterset)            {                httpDS.encoding = window._content.defaultCharacterset;            }        }    }    // set window title    var theWindow = window._content.parentWindow;    if (theWindow)    {        theWindow.title = baseURI;    }    // root the tree (do this last)    tree.setAttribute("ref", baseURI);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/02b3c94408a5ff98171177c72268ae65b9b51174/directory.js/buggy/suite/common/directory/directory.js