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