rem: var isupports = Components.classes['component: 
add: var isupports = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService(); 
context: function localeSwitching(winType, baseDirectory, providerName){  dump("\n ** Enter localeSwitching() ** \n");  dump("\n ** winType=" +  winType + " ** \n");  dump("\n ** baseDirectory=" +  baseDirectory + " ** \n");  dump("\n ** providerName=" +  providerName + " ** \n");  //  var rdf;  if(document.rdf) {    rdf = document.rdf;    dump("\n ** rdf = document.rdf ** \n");  }  else if(Components) {    var isupports = Components.classes['component://netscape/rdf/rdf-service'].getService();    rdf = isupports.QueryInterface(Components.interfaces.nsIRDFService);    dump("\n ** rdf = Components... ** \n");  }  else {    dump("can't find nuthin: no document.rdf, no Components. \n");  }  //  var ds = rdf.GetDataSource("rdf:chrome");  // For M4 builds, use this line instead.  // var ds = rdf.GetDataSource("resource:/chrome/registry.rdf");  var srcURL = "chrome://";  srcURL += winType + "/locale/";  dump("\n** srcURL=" + srcURL + " **\n");  var sourceNode = rdf.GetResource(srcURL);  var baseArc = rdf.GetResource("http://chrome.mozilla.org/rdf#base");  var nameArc = rdf.GetResource("http://chrome.mozilla.org/rdf#name");                        // Get the old targets  var oldBaseTarget = ds.GetTarget(sourceNode, baseArc, true);  dump("\n** oldBaseTarget=" + oldBaseTarget + "**\n");  var oldNameTarget = ds.GetTarget(sourceNode, nameArc, true);  dump("\n** oldNameTarget=" + oldNameTarget + "**\n");  // Get the new targets   // file:/u/tao/gila/mozilla-org/html/projects/intl/chrome/  // da-DK  if (baseDirectory == "") {	baseDirectory =  "resource:/chrome/";  }  var finalBase = baseDirectory;  if (baseDirectory != "") {	finalBase += winType + "/locale/" + providerName + "/";  }  dump("\n** finalBase=" + finalBase + "**\n");  var newBaseTarget = rdf.GetLiteral(finalBase);  var newNameTarget = rdf.GetLiteral(providerName);    // Unassert the old relationships  if (baseDirectory != "") {  	ds.Unassert(sourceNode, baseArc, oldBaseTarget);  }  ds.Unassert(sourceNode, nameArc, oldNameTarget);    // Assert the new relationships (note that we want a reassert rather than  // an unassert followed by an assert, once reassert is implemented)  if (baseDirectory != "") {  	ds.Assert(sourceNode, baseArc, newBaseTarget, true);  }  ds.Assert(sourceNode, nameArc, newNameTarget, true);    // Flush the modified data source to disk  // (Note: crashes in M4 builds, so don't use Flush() until fix checked in)  ds.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flush();  // Open up a new window to see your new chrome, since changes aren't yet dynamically  // applied to the current window  // BrowserOpenWindow('chrome://addressbook/content');  dump("\n ** Leave localeSwitching() ** \n");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6cc70ebd6c97bd0b2fe48c31f579e855387ced9d/nsFilePicker.js/clean/xpfe/components/filepicker/src/nsFilePicker.js