context: function autoClose(aDownload){  if (gDownloadManager.activeDownloadCount == 0) {    // For the moment, just use the simple heuristic that if this window was    // opened by the download process, rather than by the user, it should auto-close    // if the pref is set that way. If the user opened it themselves, it should    // not close until they explicitly close it.     // We may like to revisit this in a bit more detail later, perhaps we want    // to keep it up if the user messes with it in a significant way.    var pref = Components.classes["@mozilla.org/preferences-service;1"]                        .getService(Components.interfaces.nsIPrefBranch);    var autoClose = pref.getBoolPref(PREF_BDM_CLOSEWHENDONE)    if (autoClose && (!window.opener || window.opener.location.href == window.location.href) &&        gCanAutoClose)      gCloseDownloadManager();  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1777c7322f0813cf2c5438884f2b41b5b62b3dc1/downloads.js/clean/toolkit/mozapps/downloads/content/downloads.js