mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 823411 - Permission Prompt Helper doesn't forward access field to prompt. r=sicking
This commit is contained in:
parent
935330a0a2
commit
ecec5b899d
@ -94,6 +94,7 @@ this.PermissionPromptHelper = {
|
||||
// create a nsIContentPermissionRequest
|
||||
let request = {
|
||||
type: msg.type,
|
||||
access: msg.access ? msg.access : "unused",
|
||||
principal: principal,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentPermissionRequest]),
|
||||
allow: aCallbacks.allow,
|
||||
|
@ -68,9 +68,11 @@ PermissionPromptService.prototype = {
|
||||
+ "2nd argument must be type 'nsIContentPermissionRequest'");
|
||||
}
|
||||
|
||||
let type = aRequest.access !== "unused" ? aRequest.type + "-" + aRequest.access
|
||||
: aRequest.type;
|
||||
let perm =
|
||||
permissionManager.testExactPermissionFromPrincipal(aRequest.principal,
|
||||
aRequest.type);
|
||||
permissionManager.testExactPermissionFromPrincipal(aRequest.principal, type);
|
||||
|
||||
switch (perm) {
|
||||
case Ci.nsIPermissionManager.ALLOW_ACTION:
|
||||
aRequest.allow();
|
||||
|
Loading…
Reference in New Issue
Block a user