rem: #ifdef XP_UNIX #ifndef XP_MACOSX  var parent = f.parent; if (parent) { var pref = Components.classes["@mozilla.org/preferences-service;1"] .getService(Components.interfaces.nsIPrefBranch); var browserURL = pref.getCharPref("browser.chromeURL"); window.openDialog(browserURL, "_blank", "chrome,all,dialog=no", parent.path); 
add: try { f.reveal(); } catch (ex) {   var parent = f.parent; if (parent) { openExternal(parent.path); } 
context: function onDownloadShow(aEvent){  var f = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);  f.initWithPath(aEvent.target.id);  if (f.exists()) {#ifdef XP_UNIX#ifndef XP_MACOSX    // on unix, open a browser window rooted at the parent    var parent = f.parent;    if (parent) {      var pref = Components.classes["@mozilla.org/preferences-service;1"]                          .getService(Components.interfaces.nsIPrefBranch);      var browserURL = pref.getCharPref("browser.chromeURL");                                window.openDialog(browserURL, "_blank", "chrome,all,dialog=no", parent.path);    }#else    // MacOS X identifies as Unix.    f.reveal();#endif#else    f.reveal();#endif  }  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("fileDoesNotExistShowTitle", [name]);    var promptSvc = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);    promptSvc.alert(window, title, message);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ff9db7b110791e119fd540ddc5fa2288a2d37ac7/downloads.js/buggy/toolkit/mozapps/downloads/content/downloads.js