mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 910431 - Electrolysis: Permission code followup. f=felipe
This commit is contained in:
parent
8773f9140b
commit
f3a1f4283a
@ -1734,15 +1734,11 @@ ContentPermissionPrompt.prototype = {
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionPrompt]),
|
||||
|
||||
_getBrowserForRequest: function (aRequest) {
|
||||
var browser;
|
||||
try {
|
||||
// "element" is only defined in e10s mode, otherwise it throws.
|
||||
browser = aRequest.element;
|
||||
} catch (e) {}
|
||||
// "element" is only defined in e10s mode.
|
||||
let browser = aRequest.element;
|
||||
if (!browser) {
|
||||
var requestingWindow = aRequest.window.top;
|
||||
// find the requesting browser or iframe
|
||||
browser = requestingWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
// Find the requesting browser.
|
||||
browser = aRequest.window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell)
|
||||
.chromeEventHandler;
|
||||
|
@ -318,7 +318,9 @@ DesktopNotificationRequest::GetWindow(nsIDOMWindow * *aRequestingWindow)
|
||||
NS_IMETHODIMP
|
||||
DesktopNotificationRequest::GetElement(nsIDOMElement * *aElement)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
NS_ENSURE_ARG_POINTER(aElement);
|
||||
*aElement = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -179,7 +179,9 @@ NotificationPermissionRequest::GetWindow(nsIDOMWindow** aRequestingWindow)
|
||||
NS_IMETHODIMP
|
||||
NotificationPermissionRequest::GetElement(nsIDOMElement** aElement)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
NS_ENSURE_ARG_POINTER(aElement);
|
||||
*aElement = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user