rem: if (this.mParentWindow) { parent = this.mParentWindow; } else if (window) { parent = window; } else { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.GetHiddenWindow(); } 
add: try { if (this.mParentWindow) { parent = this.mParentWindow; } else if (window) { parent = window; } else { var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService); parent = appShellService.GetHiddenWindow(); } } catch(ex) { } 
context:   show: function() {    var o = new Object();    o.title = this.mTitle;    o.mode = this.mMode;    o.displayDirectory = this.mDisplayDirectory;    o.defaultString = this.mDefaultString;    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) {      parent = window;    } else {      var appShellService = Components.classes[APPSHELL_SERV_PROGID].getService(nsIAppShellService);      parent = appShellService.GetHiddenWindow();    }    parent.openDialog("chrome://global/content/filepicker.xul",                      "",                      "chrome,modal,resizeable=yes,dependent=yes",                      o);    this.mFile = o.retvals.file;    lastDirectory = o.retvals.directory;    return o.retvals.buttonStatus;  }
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/519f948a04f68f1873c651e466424b926e292638/nsFilePicker.js/buggy/xpfe/components/filepicker/src/nsFilePicker.js