Bug 384161 - autoRemoveAndClose checks wrong pref type. Patch by Edward Lee <edilee@gmail.com>. r=sdwilsh

This commit is contained in:
sdwilsh@shawnwilsher.com 2007-06-18 13:17:42 -07:00
Родитель 911d69b65c
Коммит def20f77fb
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -154,13 +154,8 @@ function autoRemoveAndClose(aDownload)
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var autoRemove = false;
try {
// this can throw, since it doesn't exist
autoRemove = pref.getBoolPref(PREF_BDM_RETENTION);
} catch (e) { }
if (dl && autoRemove) {
// The download manager backed removes this, but we have to update the UI!
if (aDownload && (pref.getIntPref(PREF_BDM_RETENTION) == 0)) {
// The download manager backend removes this, but we have to update the UI!
var dl = getDownload(aDownload.id);
dl.parentNode.removeChild(dl);
}