rem: } else if (window && typeof(window) == "object") { 
add: } else if (typeof(window) == "object" && window != null) { 
context:   show: function() {    var o = new Object();    o.title = this.mTitle;    o.mode = this.mMode;    o.displayDirectory = this.mDisplayDirectory;    o.defaultString = this.mDefaultString;    o.filterIndex = this.mFilterIndex;    o.filters = new Object();    o.filters.titles = this.mFilterTitles;    o.filters.types = this.mFilters;    o.retvals = new Object();    var parent;    if (this.mParentWindow) {      parent = this.mParentWindow;    } else if (window && typeof(window) == "object") {      parent = window;    } else {      try {        var appShellService = Components.classes[APPSHELL_SERV_CONTRACTID].getService(nsIAppShellService);        parent = appShellService.hiddenDOMWindow;      } catch(ex) {        debug("Can't get parent.  xpconnect hates me so we can't get one from the appShellService.\n");        debug(ex + "\n");      }    }    try {      parent.openDialog("chrome://global/content/filepicker.xul",                        "",                        "chrome,modal,titlebar,resizable=yes,dependent=yes",                        o);      this.mFile = o.retvals.file;      this.mFilterIndex = o.retvals.filterIndex;      lastDirectory = o.retvals.directory;      return o.retvals.buttonStatus;    } catch(ex) { dump("unable to open file picker\n" + ex + "\n"); }    return null;  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4b695da23d75537fead12b3a6cdc089c7dd39b46/nsFilePicker.js/clean/xpfe/components/filepicker/src/nsFilePicker.js