зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1568510. Pass an nsIInterfaceRequestor, not nsISupports, as context to helper app dialog methods. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D39181 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e82c5fe738
Коммит
e04595bab6
|
@ -150,9 +150,7 @@ nsUnknownContentTypeDialog.prototype = {
|
|||
|
||||
// Cache some information in case this context goes away:
|
||||
try {
|
||||
let parent = aContext
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
let parent = aContext.getInterface(Ci.nsIDOMWindow);
|
||||
this._mDownloadDir = new downloadModule.DownloadLastDir(parent);
|
||||
} catch (ex) {
|
||||
Cu.reportError(
|
||||
|
@ -172,8 +170,7 @@ nsUnknownContentTypeDialog.prototype = {
|
|||
// activate the OK button. So we wait a bit before doing opening it.
|
||||
reallyShow() {
|
||||
try {
|
||||
let ir = this.mContext.QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
let docShell = ir.getInterface(Ci.nsIDocShell);
|
||||
let docShell = this.mContext.getInterface(Ci.nsIDocShell);
|
||||
let rootWin = docShell.rootTreeItem.domWindow;
|
||||
this.mDialog = Services.ww.openWindow(
|
||||
rootWin,
|
||||
|
@ -235,9 +232,7 @@ nsUnknownContentTypeDialog.prototype = {
|
|||
let parent;
|
||||
let gDownloadLastDir;
|
||||
try {
|
||||
parent = aContext
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow);
|
||||
parent = aContext.getInterface(Ci.nsIDOMWindow);
|
||||
} catch (ex) {}
|
||||
|
||||
if (parent) {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
interface nsIHelperAppLauncher;
|
||||
interface nsIFile;
|
||||
interface nsIInterfaceRequestor;
|
||||
|
||||
/**
|
||||
* This interface is used to display a confirmation dialog before
|
||||
|
@ -54,7 +55,7 @@ interface nsIHelperAppLauncherDialog : nsISupports {
|
|||
* REASON_CANTHANDLE.
|
||||
*/
|
||||
void show(in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aWindowContext,
|
||||
in nsIInterfaceRequestor aWindowContext,
|
||||
in unsigned long aReason);
|
||||
|
||||
/**
|
||||
|
@ -77,7 +78,7 @@ interface nsIHelperAppLauncherDialog : nsISupports {
|
|||
* prompted.
|
||||
*/
|
||||
void promptForSaveToFileAsync(in nsIHelperAppLauncher aLauncher,
|
||||
in nsISupports aWindowContext,
|
||||
in nsIInterfaceRequestor aWindowContext,
|
||||
in wstring aDefaultFileName,
|
||||
in wstring aSuggestedFileExtension,
|
||||
in boolean aForcePrompt);
|
||||
|
|
Загрузка…
Ссылка в новой задаче