rem: var errorMessage = checkProfileName(newName); 
add: errorMessage = checkProfileName(newName); 
context: function RenameProfile(){  var lString, oldName, newName;  var renameButton = document.getElementById("renbutton");  if (renameButton.getAttribute("disabled") == "true" )    return false;  var profileList = document.getElementById( "profiles" );  var selected = profileList.view.getItemAtIndex(profileList.currentIndex);  var profilename = selected.getAttribute("profile_name");  if( selected.getAttribute("rowMigrate") == "no" ) {    // migrate if the user wants to    lString = gProfileManagerBundle.getString("migratebeforerename");    lString = lString.replace(/\s*<html:br\/>/g,"\n");    lString = lString.replace(/%brandShortName%/, 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;  }  else {    oldName = selected.getAttribute("profile_name");    newName = {value:oldName};    var dialogTitle = gProfileManagerBundle.getString("renameprofiletitle");    var msg = gProfileManagerBundle.getString("renameProfilePrompt");    msg = msg.replace(/%oldProfileName%/gi, oldName);    while (1) {      var rv = promptService.prompt(window, dialogTitle, msg, newName, null, {value:0});      if (rv) {        newName = newName.value;        // User hasn't changed the profile name. Treat as if cancel was pressed.        if (newName == oldName)          return false;        var errorMessage = checkProfileName(newName);        if (errorMessage) {          var profileNameInvalidTitle = gProfileManagerBundle.getString("profileNameInvalidTitle");          promptService.alert(window, profileNameInvalidTitle, errorMessage);          return false;        }                var migrate = selected.getAttribute("rowMigrate");        try {          profile.renameProfile(oldName, newName);          selected.firstChild.firstChild.setAttribute( "label", newName );          selected.setAttribute( "profile_name", newName );        }        catch(e) {          lString = gProfileManagerBundle.getString("profileExists");          var profileExistsTitle = gProfileManagerBundle.getString("profileExistsTitle");          promptService.alert(window, profileExistsTitle, lString);          continue;        }      }      break;    }  }  // set the button state  DoEnabling();   return true; }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5ed012f6738eb68bd576d82c2752ebcd372bf2d4/profileManager.js/buggy/profile/resources/content/profileManager.js