rem: var count = history.treeBoxObject.view.rowCount; 
add: if (!treeView) { setTimeout(updateGoMenu, 0, goMenu); return; }  var count = treeView.rowCount; 
context: function updateGoMenu(goMenu){  // In case the timer didn't fire.  destroyGoMenuItems(goMenu);  var history = document.getElementById("hiddenHistoryTree");    if (history.hidden) {    history.hidden = false;    var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"]                                  .getService(Components.interfaces.nsIRDFDataSource);    history.database.AddDataSource(globalHistory);  }  if (!history.ref)    history.ref = "NC:HistoryRoot";    var count = history.treeBoxObject.view.rowCount;  if (count > 10)    count = 10;  if (count == 0)    return;  const NC_NS     = "http://home.netscape.com/NC-rdf#";  if (!gRDF)     gRDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]                      .getService(Components.interfaces.nsIRDFService);  var builder = history.builder.QueryInterface(Components.interfaces.nsIXULTreeBuilder);    var beforeItem = document.getElementById("endHistorySeparator");    var nameResource = gRDF.GetResource(NC_NS + "Name");  var endSep = beforeItem;  var showSep = false;  for (var i = count-1; i >= 0; i--) {    var res = builder.getResourceAtIndex(i);    var url = res.Value;    var titleRes = history.database.GetTarget(res, nameResource, true);    if (!titleRes)      continue;    showSep = true;    var titleLiteral = titleRes.QueryInterface(Components.interfaces.nsIRDFLiteral);    beforeItem = constructGoMenuItem(goMenu, beforeItem, url, titleLiteral.Value);  }  if (showSep)    endSep.hidden = false;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/63e78c6b6441030f3dd45cb748b40486d3864be4/browser.js/clean/browser/base/content/browser.js