bug 809085 make permissions panels work with social content, r=felipe

This commit is contained in:
Shane Caraveo
2013-06-21 16:14:22 -07:00
parent ae2b0f331e
commit eb553a84b0
10 changed files with 155 additions and 33 deletions

View File

@@ -1673,6 +1673,13 @@ ContentPermissionPrompt.prototype = {
var requestingWindow = aRequest.window.top;
var chromeWin = this._getChromeWindow(requestingWindow).wrappedJSObject;
var browser = chromeWin.gBrowser.getBrowserForDocument(requestingWindow.document);
if (!browser) {
// find the requesting browser or iframe
browser = requestingWindow.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell)
.chromeEventHandler;
}
var requestPrincipal = aRequest.principal;
// Transform the prompt actions into PopupNotification actions.