rem: profilesElement.selectedItem = listitem; 
add: setTimeout(function f(a) { profilesElement.selectedItem = a; }, 0, listitem); 
context: function startup(){  try {    gDialogParams = window.arguments[0].      QueryInterface(I.nsIDialogParamBlock);    gProfileService = C[ToolkitProfileService].getService(I.nsIToolkitProfileService);    gProfileManagerBundle = document.getElementById("bundle_profileManager");    gBrandBundle = document.getElementById("bundle_brand");    gPromptService = C[PromptService].getService(I.nsIPromptService);    document.documentElement.centerWindowOnScreen();    var profilesElement = document.getElementById("profiles");    var profileList = gProfileService.profiles;    while (profileList.hasMoreElements()) {      var profile = profileList.getNext().QueryInterface(I.nsIToolkitProfile);      var listitem = profilesElement.appendItem(profile.name, "");      var tooltiptext =        gProfileManagerBundle.getFormattedString("profileTooltip", [profile.name, profile.rootDir.path]);      listitem.setAttribute("tooltiptext", tooltiptext);      listitem.setAttribute("class", "listitem-iconic");      listitem.profile = profile;      try {        if (profile === gProfileService.selectedProfile) {          profilesElement.selectedItem = listitem;        }      }      catch(e) { }    }    var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");    autoSelectLastProfile.checked = gProfileService.startWithLastProfile;    profilesElement.focus();  }  catch(e) {    window.close();    throw (e);  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/7187fe88a7410666037b7549329f20ba05d724b0/profileSelection.js/clean/toolkit/profile/content/profileSelection.js