rem: var appShellService = Components.classes["@mozilla.org/appshell/appShellService;1"] .getService(Components.interfaces.nsIAppShellService); appShellService.quit(Components.interfaces.nsIAppShellService.eForceQuit); 
add: var appStartup = Components.classes["@mozilla.org/seamonkey/app-startup;1"] .getService(Components.interfaces.nsIAppStartup); appStartup.quit(Components.interfaces.nsIAppStartup.eForceQuit); 
context: function onStart(){  var profileList = document.getElementById("profiles");  var selected = profileList.view.getItemAtIndex(profileList.currentIndex);  var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].    getService(Components.interfaces.nsIPromptService);  var profilename = selected.getAttribute("profile_name");  if( selected.getAttribute("rowMigrate") == "no" ) {    var lString = gProfileManagerBundle.getString("migratebeforestart");    lString = lString.replace(/\s*<html:br\/>/g,"\n");    lString = lString.replace(/%brandShortName%/gi,                              gBrandBundle.getString("brandShortName"));    var title = gProfileManagerBundle.getString("migratetitle");    if (promptService.confirm(window, title, lString)) {      var profileDir = profile.getProfileDir(profilename);      if (profileDir) {        profileDir = profileDir.QueryInterface( Components.interfaces.nsIFile );        if (profileDir) {          if (!profileDir.exists()) {            var errorMessage = gProfileManagerBundle.getString("sourceProfileDirMissing");            var profileDirMissingTitle = gProfileManagerBundle.getString("sourceProfileDirMissingTitle");            promptService.alert(window, profileDirMissingTitle, errorMessage);              return false;                    }        }      }            profile.migrateProfile( profilename );    }    else      return false;  }  // start in online or offline mode  if (gStartupMode) {    var offlineState = document.getElementById("offlineState");    var ioService = Components.classes["@mozilla.org/network/io-service;1"].                      getService(Components.interfaces.nsIIOService);    if (offlineState.checked != ioService.offline)      ioService.offline = offlineState.checked;  }  var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");  if (!autoSelectLastProfile.hidden)    profile.startWithLastUsedProfile = autoSelectLastProfile.checked;    try {    profile.currentProfile = profilename;  }  catch (ex) {	  var brandName = gBrandBundle.getString("brandShortName");        var message;    var fatalError = false;    switch (ex.result) {      case Components.results.NS_ERROR_FILE_ACCESS_DENIED:        message = gProfileManagerBundle.getFormattedString("profDirLocked", [brandName, profilename]);        message = message.replace(/\s*<html:br\/>/g,"\n");        break;      case Components.results.NS_ERROR_FILE_NOT_FOUND:        message = gProfileManagerBundle.getFormattedString("profDirMissing", [brandName, profilename]);        message = message.replace(/\s*<html:br\/>/g,"\n");        break;      case Components.results.NS_ERROR_ABORT:        message = gProfileManagerBundle.getFormattedString("profileSwitchFailed", [brandName, profilename, brandName, brandName]);        message = message.replace(/\s*<html:br\/>/g,"\n");        fatalError = true;        break;      default:        message = ex.message;        break;  }      promptService.alert(window, null, message);      if (fatalError)      {        var appShellService = Components.classes["@mozilla.org/appshell/appShellService;1"]                              .getService(Components.interfaces.nsIAppShellService);        appShellService.quit(Components.interfaces.nsIAppShellService.eForceQuit);      }      return false;  }    gDialogParams.SetInt(0, 1); // 1 == success      return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/3055933c278e6a315788ee06fade12ac152a0159/profileSelection.js/buggy/profile/resources/content/profileSelection.js