rem: let index = gDownloadsView.selectedIndex; gDownloadsView.removeChild(aDownload); gDownloadsView.selectedIndex = Math.min(index, gDownloadsView.itemCount - 1); 
context: function removeDownload(aDownload){  gDownloadManager.removeDownload(aDownload.getAttribute("dlid"));  let index = gDownloadsView.selectedIndex;  gDownloadsView.removeChild(aDownload);  gDownloadsView.selectedIndex = Math.min(index, gDownloadsView.itemCount - 1);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/96121b6b474f5bf8ca13b4decd780950d82948b6/downloads.js/buggy/toolkit/mozapps/downloads/content/downloads.js