rem: var prefs = Components.classes['component: 
add: var prefs = Components.classes['@mozilla.org/preferences;1']; 
context: function get_remote_datasource_url() {  var url = '';  var prefs = Components.classes['component://netscape/preferences'];  if (prefs) {    prefs = prefs.getService();  }  if (prefs) {    prefs = prefs.QueryInterface(Components.interfaces.nsIPref);  }  if (prefs) {    var locale;    try {      url = prefs.CopyCharPref("sidebar.customize.all_panels.url");      url = url.replace(/%SIDEBAR_VERSION%/g, SIDEBAR_VERSION);    } catch(ex) {      debug("Unable to get remote url pref. What now? "+ex);    }    try {      locale = prefs.CopyCharPref("intl.content.langcode");    } catch(ex) {      try {        debug("No lang code pref, intl.content.langcode.");        debug("Use locale from user agent string instead");        var locale_progid = 'component://netscape/intl/nslocaleservice';        var syslocale = Components.classes[locale_progid].getService();        syslocale = syslocale.QueryInterface(Components.interfaces.nsILocaleService);        locale = syslocale.GetLocaleComponentForUserAgent();	  } catch(ex) {        debug("Unable to get system locale. What now? "+ex);      }    }    locale = locale.toLowerCase();    url = url.replace(/%LOCALE%/g, locale);    debug("Remote url is " + url);  }  return url;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/96cde4474fe82e4dacdcc727eaebd9308fd70684/sidebarOverlay.js/buggy/suite/common/sidebar/sidebarOverlay.js