rem: var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService); 
context: function onStart(){  var profileList = document.getElementById("profiles");  var selected = profileList.selectedItems[0];  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");    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();    promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);    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  var offlineState = document.getElementById("offlineState");  var ioService = nsJSComponentManager.getServiceByID("{9ac9e770-18bc-11d3-9337-00104ba0fd40}",                                                  "nsIIOService");  ioService.offline = offlineState.checked;  try {    var dirExists;    try {      var profileDir = profile.getProfileDir(profilename);      dirExists = profileDir.exists();    }    catch (e) {      dirExists = false;    }    	if (dirExists == false) {	  var brandName = gBrandBundle.getString("brandShortName");	  var alertString = gProfileManagerBundle.getFormattedString("profDirMissing", [brandName, profilename]);	  alertString = alertString.replace(/\s*<html:br\/>/g,"\n");	        alert(alertString);      return;    }    // All this really does is set the current profile.    // It has nothing to do with starting the application.    profile.startApprunner(profilename);  }  catch (ex) {    //var stringA = gProfileManagerBundle.getString(failProfileStartA);    //var stringB = gProfileManagerBundle.getString(failProfileStartB);    //alert(stringA + " " + profilename + " " + stringB);  }  return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/3a23d4a13382670e936a2d8d1ddfff1e01e6282e/profileSelection.js/buggy/profile/resources/content/profileSelection.js