fix assertions when trying to bring up file picker bug #37121

This commit is contained in:
pavlov%netscape.com 2000-05-03 21:47:05 +00:00
Родитель 3c4d2464d6
Коммит 1ae3baa7aa
2 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -38,6 +38,8 @@
const DEBUG = true; /* set to false to suppress debug messages */
const FILEPICKER_PROGID = "component://mozilla/filepicker";
const FILEPICKER_CID = Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}");
const APPSHELL_SERV_PROGID= "component://netscape/appshell/appShellService";
const nsIAppShellService = Components.interfaces.nsIAppShellService;
const nsILocalFile = Components.interfaces.nsILocalFile;
const nsIFileURL = Components.interfaces.nsIFileURL;
const nsISupports = Components.interfaces.nsISupports;
@ -133,8 +135,11 @@ nsFilePicker.prototype = {
var parent;
if (this.mParentWindow) {
parent = this.mParentWindow;
} else {
} 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",

Просмотреть файл

@ -38,6 +38,8 @@
const DEBUG = true; /* set to false to suppress debug messages */
const FILEPICKER_PROGID = "component://mozilla/filepicker";
const FILEPICKER_CID = Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}");
const APPSHELL_SERV_PROGID= "component://netscape/appshell/appShellService";
const nsIAppShellService = Components.interfaces.nsIAppShellService;
const nsILocalFile = Components.interfaces.nsILocalFile;
const nsIFileURL = Components.interfaces.nsIFileURL;
const nsISupports = Components.interfaces.nsISupports;
@ -133,8 +135,11 @@ nsFilePicker.prototype = {
var parent;
if (this.mParentWindow) {
parent = this.mParentWindow;
} else {
} 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",