diff --git a/b2g/components/ContentPermissionPrompt.js b/b2g/components/ContentPermissionPrompt.js index 433fe1ddf63d..358f58a4abcd 100644 --- a/b2g/components/ContentPermissionPrompt.js +++ b/b2g/components/ContentPermissionPrompt.js @@ -47,10 +47,21 @@ ContentPermissionPrompt.prototype = { evt.target.removeEventListener(evt.type, contentEvent); if (evt.detail.type == "permission-allow") { + + if (evt.detail.remember) { + Services.perms.addFromPrincipal(request.principal, request.type, + Ci.nsIPermissionManager.ALLOW_ACTION); + } + request.allow(); return; } + if (evt.detail.remember) { + Services.perms.addFromPrincipal(request.principal, request.type, + Ci.nsIPermissionManager.DENY_ACTION); + } + request.cancel(); });