rem:   entries.InsertElementAt(entry, 1, true);    for (index = entries.GetCount(); index > MAX_HISTORY_ITEMS; --index) { entries.RemoveElementAt(index, true); } } } 
add:   for (index = entries.GetCount(); index > MAX_HISTORY_ITEMS; --index) { entries.RemoveElementAt(index, true); } } } 
context: function addToUrlbarHistory()  {	var urlToAdd = gURLBar.value;	if (!urlToAdd)	   return;	if (localstore) {    var entries = rdfc.MakeSeq(localstore, rdf.GetResource("nc:urlbar-history"));	var entry = rdf.GetLiteral(urlToAdd);    var index = entries.IndexOf(entry);    if (index != -1) {      // we've got it already. Remove it from its old place      // and insert it to the top      //dump("URL already in urlbar history\n");      entries.RemoveElementAt(index, true);    }    // Otherwise, we've got a new URL in town. Add it!    // Put the new entry at the front of the list.    entries.InsertElementAt(entry, 1, true);    // Remove any expired history items so that we don't let this grow    // without bound.    for (index = entries.GetCount(); index > MAX_HISTORY_ITEMS; --index) {      entries.RemoveElementAt(index, true);    }  }  }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/7e2782ec3ea5bf3d73833f09138f8cbe55659466/sessionHistoryUI.js/clean/xpfe/browser/resources/content/sessionHistoryUI.js