Bug 882495 - Get window for permission prompt by outer window ID instead of most recent window. r=gwagner

--HG--
extra : rebase_source : a9ac7ca43e77a0144005fb68a67aa653598378cb
This commit is contained in:
Shane Tully 2013-07-10 12:47:18 -07:00
parent f6b9497b4e
commit 73a5ca1331
2 changed files with 3 additions and 2 deletions

View File

@ -739,7 +739,8 @@ ContactManager.prototype = {
requestID: requestID,
origin: principal.origin,
appID: principal.appId,
browserFlag: principal.isInBrowserElement
browserFlag: principal.isInBrowserElement,
windowID: this._window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).outerWindowID
});
},

View File

@ -86,7 +86,7 @@ this.PermissionPromptHelper = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionRequest]),
allow: aCallbacks.allow,
cancel: aCallbacks.cancel,
window: Services.wm.getMostRecentWindow("navigator:browser")
window: Services.wm.getOuterWindowWithId(msg.windowID)
};
permissionPromptService.getPermission(request);