rem: var urls = []; 
context: HistoryMenu.populateUndoSubmenu = function PHM_populateUndoSubmenu() {  var undoPopup = document.getElementById("historyUndoPopup");  // remove existing menu items  while (undoPopup.hasChildNodes())    undoPopup.removeChild(undoPopup.firstChild);  // get closed-tabs from nsSessionStore  var ss = Cc["@mozilla.org/browser/sessionstore;1"].           getService(Ci.nsISessionStore);  // no restorable tabs, so make sure menu is disabled, and return  if (ss.getClosedTabCount(window) == 0) {    undoPopup.parentNode.setAttribute("disabled", true);    return;  }  // enable menu  undoPopup.parentNode.removeAttribute("disabled");  // populate menu  var urls = [];  var undoItems = ss.getClosedTabData(window);  var keys = undoItems.getKeys({});  for (var i = 0; i < keys.length; i++) {    var key = keys[i];    var tabData = undoItems.getValue(key).wrappedJSObject;    var m = undoPopup.appendChild(document.createElement("menuitem"));    m.setAttribute("label", tabData.title);    m.setAttribute("value", key);    m.addEventListener("command", function(aEvent) {       undoCloseTab(aEvent.originalTarget.getAttribute("value"));    }, false);    urls.push(tabData.state.entries[0].url);  }  // "open in tabs"  var strings = document.getElementById("placeBundle");  undoPopup.appendChild(document.createElement("menuseparator"));  m = undoPopup.appendChild(document.createElement("menuitem"));  m.setAttribute("label", strings.getString("menuOpenInTabs.label"));  m.setAttribute("accesskey", strings.getString("menuOpenInTabs.accesskey"));  m.addEventListener("command", function() { loadOneOrMoreURIs(urls.join("|")); }, false);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1be77a73464f203f8c629a4819341f7a3fffbc03/browser.js/buggy/browser/base/content/browser.js