rem: f.launch(); 
add: try { f.launch(); } catch (ex) {   openExternal(f.path); } 
context: function onDownloadOpen(aEvent){  if (aEvent.type == "dblclick" && aEvent.button != 0)    return;  var download = aEvent.target;  if (download.localName == "download") {    if (download.openable) {      var f = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);      f.initWithPath(aEvent.target.id);      if (f.exists()) {        if (f.isExecutable()) {          var dontAsk = false;          var pref = Components.classes["@mozilla.org/preferences-service;1"]                              .getService(Components.interfaces.nsIPrefBranch);          try {            dontAsk = !pref.getBoolPref(PREF_BDM_ALERTONEXEOPEN);          }          catch (e) { }                    if (!dontAsk) {            var strings = document.getElementById("downloadStrings");            var name = aEvent.target.getAttribute("target");            var message = strings.getFormattedString("fileExecutableSecurityWarning", [name, name]);            var title = strings.getString("fileExecutableSecurityWarningTitle");            var dontAsk = strings.getString("fileExecutableSecurityWarningDontAsk");            var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);            var checkbox = { value: false };            var open = promptSvc.confirmCheck(window, title, message, dontAsk, checkbox);                        if (!open)               return;            else              pref.setBoolPref(PREF_BDM_ALERTONEXEOPEN, !checkbox.value);                        }                }        f.launch();      }      else {        var brandStrings = document.getElementById("brandStrings");        var appName = brandStrings.getString("brandShortName");              var strings = document.getElementById("downloadStrings");        var name = aEvent.target.getAttribute("target");        var message = strings.getFormattedString("fileDoesNotExistError", [name, appName]);        var title = strings.getFormattedString("fileDoesNotExistOpenTitle", [name]);        var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);        promptSvc.alert(window, title, message);      }    }    else if(download.canceledOrFailed) {      // If the user canceled this download, double clicking tries again.       fireEventForElement(download, "retry")    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ff9db7b110791e119fd540ddc5fa2288a2d37ac7/downloads.js/buggy/toolkit/mozapps/downloads/content/downloads.js