rem: var locator_interface = Components.interfaces.nsIFileLocator; var locator_prog_id = 'component: var locator_service = Components.classes[locator_prog_id].getService();    locator_service = locator_service.QueryInterface(locator_interface);    var sidebar_file = locator_service.GetFileLocation(panels_file_id);  if (!sidebar_file.exists()) {   return null; }  debug("sidebar uri is " + sidebar_file.URLString); 
add: var sidebar_file = sidebar_get_panels_file(); 
context: function get_sidebar_datasource_uri(panels_file_id) {  try {    var locator_interface = Components.interfaces.nsIFileLocator;    var locator_prog_id = 'component://netscape/filelocator';    var locator_service = Components.classes[locator_prog_id].getService();    // use the fileLocator to look in the profile directory    // to find 'panels.rdf', which is the    // database of the user's currently selected panels.    locator_service = locator_service.QueryInterface(locator_interface);    // if <profile>/panels.rdf doesn't exist, GetFileLocation() will copy    // bin/defaults/profile/panels.rdf to <profile>/panels.rdf    var sidebar_file = locator_service.GetFileLocation(panels_file_id);    if (!sidebar_file.exists()) {      // this should not happen, as GetFileLocation() should copy      // defaults/panels.rdf to the users profile directory      return null;    }    debug("sidebar uri is " + sidebar_file.URLString);    return sidebar_file.URLString;  }  catch (ex) {    // this should not happen    debug("Error: Unable to load panels file.\n");    return null;  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6d8d83b44c46170aad8606a55a3960be810e9e2c/sidebarOverlay.js/buggy/suite/common/sidebar/sidebarOverlay.js