rem: try { historyCount = gPrefs.GetIntPref("editor.history.url_maximum"); } catch(e) {} 
add: try { historyCount = gPrefs.getIntPref("editor.history.url_maximum"); } catch(e) {} 
context: function BuildRecentMenu(savePrefs){  // Can't do anything if no prefs  if (!gPrefs) return;  var popup = document.getElementById("menupopup_RecentFiles");  if (!popup || !window.editorShell ||      !window.editorShell.editorDocument)    return;  // Delete existing menu  while (popup.firstChild)    popup.removeChild(popup.firstChild);  // Current page is the "0" item in the list we save in prefs,  //  but we don't include it in the menu.  var curTitle = window.editorShell.editorDocument.title;  var curUrl = window.editorShell.editorDocument.location;  var newDoc = (curUrl == "about:blank");  var historyCount = 10;  try { historyCount = gPrefs.GetIntPref("editor.history.url_maximum"); } catch(e) {}  var titleArray = new Array(historyCount);  var urlArray   = new Array(historyCount);  var menuIndex = 1;  var arrayIndex = 0;  var i;  var disableMenu = true;  if(!newDoc)  {    // Always put latest-opened URL at start of array    titleArray[0] = curTitle;    urlArray[0] = curUrl;    arrayIndex = 1;  }  for (i = 0; i < historyCount; i++)  {    var title = getUnicharPref("editor.history_title_"+i);    var url = getUnicharPref("editor.history_url_"+i);    // Continue if URL pref is missing because     //  a URL not found during loading may have been removed    if (!url)      continue;    // Skip over current URL    if (url != curUrl)    {      // Build the menu      AppendRecentMenuitem(popup, title, url, menuIndex);      menuIndex++;      disableMenu = false;      // Save in array for prefs      if (savePrefs && arrayIndex < historyCount)      {        titleArray[arrayIndex] = title;        urlArray[arrayIndex] = url;        arrayIndex++;      }    }  }  // Now resave the list back to prefs in the new order  if (savePrefs)  {    savePrefs = false;    for (i = 0; i < historyCount; i++)    {      if (!urlArray[i])        break;      setUnicharPref("editor.history_title_"+i, titleArray[i]);      setUnicharPref("editor.history_url_"+i, urlArray[i]);      savePrefs = true;    }  }  // Force saving to file so next file opened finds these values  if (savePrefs)    gPrefs.savePrefFile(null);  // Disable menu item if no entries  DisableItem("menu_RecentFiles", disableMenu);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/faf03ce445712b372523f881cc3144cfadc7a611/editor.js/clean/editor/ui/composer/content/editor.js