rem: for (var i = 0; i < toolbox.childNodes.length; ++i) { 
add: for (i = 0; i < toolbox.childNodes.length; ++i) { 
context: function onViewToolbarsPopupShowing(aEvent){  var popup = aEvent.target;    // Empty the menu  for (var i = popup.childNodes.length-1; i >= 0; --i) {    var deadItem = popup.childNodes[i];    if (deadItem.hasAttribute("toolbarindex"))      popup.removeChild(deadItem);  }    var firstMenuItem = popup.firstChild;    var toolbox = document.getElementById("navigator-toolbox");  for (var i = 0; i < toolbox.childNodes.length; ++i) {    var toolbar = toolbox.childNodes[i];    var toolbarName = toolbar.getAttribute("toolbarname");    if (toolbarName) {      var menuItem = document.createElement("menuitem");      menuItem.setAttribute("toolbarindex", i);      menuItem.setAttribute("type", "checkbox");      menuItem.setAttribute("label", toolbarName);      menuItem.setAttribute("accesskey", toolbar.getAttribute("accesskey"));      menuItem.setAttribute("checked", toolbar.getAttribute("collapsed") != "true");      popup.insertBefore(menuItem, firstMenuItem);                    menuItem.addEventListener("command", onViewToolbarCommand, false);    }    toolbar = toolbar.nextSibling;  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/a59ab818afefab7c125103507ac29001aef33512/browser.js/clean/browser/base/content/browser.js