зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1552535 Ci.nsIScriptSecurityManager.NO_APP_ID / UNKNOWN_APP_ID are undefined r=VladBaicu
Removed variable that resolved to undefined. Differential Revision: https://phabricator.services.mozilla.com/D32136 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
af0293e185
Коммит
f8a8149014
|
@ -57,8 +57,6 @@ ContentPermissionPrompt.prototype = {
|
|||
},
|
||||
|
||||
prompt: function(request) {
|
||||
let isApp = request.principal.appId !== Ci.nsIScriptSecurityManager.NO_APP_ID && request.principal.appId !== Ci.nsIScriptSecurityManager.UNKNOWN_APP_ID;
|
||||
|
||||
// Only allow exactly one permission rquest here.
|
||||
let types = request.types.QueryInterface(Ci.nsIArray);
|
||||
if (types.length != 1) {
|
||||
|
@ -121,7 +119,7 @@ ContentPermissionPrompt.prototype = {
|
|||
Services.perms.addFromPrincipal(request.principal, perm.type, Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
// If we are in private mode, then it doesn't matter if the notification is desktop and also
|
||||
// it shouldn't matter if the Don't show checkbox was checked because it shouldn't be show in the first place
|
||||
} else if (isApp || (isPrivate && isPermanent)) {
|
||||
} else if (isPrivate && isPermanent) {
|
||||
// Otherwise allow the permission for the current session if the request comes from an app
|
||||
// or if the request was made in private mode
|
||||
Services.perms.addFromPrincipal(request.principal, perm.type, Ci.nsIPermissionManager.ALLOW_ACTION, Ci.nsIPermissionManager.EXPIRE_SESSION);
|
||||
|
|
Загрузка…
Ссылка в новой задаче