rem: if (ubHistory) { var len = ubHistory.count; var end = (len > MAX_HISTORY_MENU_ITEMS) ? (len - MAX_HISTORY_MENU_ITEMS) : 0;  deleteHistoryItems( aEvent ); for (var i = len - 1; i >= end; i--) createMenuItem( aEvent.target, i, ubHistory.getEntryAtIndex(i)); 
add:  if (localstore) { var entries = localstore.GetTargets(rdf.GetResource("nc:urlbar-history"), rdf.GetResource("http: true);  var i= MAX_HISTORY_MENU_ITEMS;  deleteHistoryItems(aEvent);  while (entries.hasMoreElements() && (i-- > 0)) { var entry = entries.getNext(); if (entry) { entry = entry.QueryInterface(Components.interfaces.nsIRDFLiteral); var url = entry.Value;  createMenuItem(aEvent.target, i, url);  } } 
context: function createUBHistoryMenu( aEvent )  {    var ubHistory = appCore.urlbarHistory;    if (ubHistory)      {        var len = ubHistory.count;        var end = (len > MAX_HISTORY_MENU_ITEMS) ? (len - MAX_HISTORY_MENU_ITEMS) : 0;        // deleteHistoryItems needs to be done even if len = 0!        deleteHistoryItems( aEvent ); // Delete old History Menus         for (var i = len - 1; i >= end; i--)          createMenuItem( aEvent.target, i, ubHistory.getEntryAtIndex(i));      }  }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/33cea53388b58331ddb4392f8e31aee47ad047ea/sessionHistoryUI.js/buggy/suite/browser/sessionHistoryUI.js