Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[embedlite-components] Expire temporary permission after session ends…
…. Contributes to JB#50930
  • Loading branch information
atatarov committed Oct 30, 2020
1 parent 6437fce commit 85d2fab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jscomps/ContentPermissionPrompt.js
Expand Up @@ -79,6 +79,9 @@ ContentPermissionPrompt.prototype = {
// If the user checked "Don't ask again", make a permanent exception
if (ret.checkedDontAsk) {
Services.perms.addFromPrincipal(request.principal, perm.type, Ci.nsIPermissionManager.DENY_ACTION);
} else {
Services.perms.addFromPrincipal(request.principal, perm.type, Ci.nsIPermissionManager.DENY_ACTION,
Ci.nsIPermissionManager.EXPIRE_SESSION);
}
cachedreqs.forEach(function(r) { r.cancel(); });
}
Expand Down

0 comments on commit 85d2fab

Please sign in to comment.