зеркало из https://github.com/mozilla/pjs.git
Bug 384161 - autoRemoveAndClose checks wrong pref type. Patch by Edward Lee <edilee@gmail.com>. r=sdwilsh
This commit is contained in:
Родитель
911d69b65c
Коммит
def20f77fb
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче