mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1611035 - Grant "desktop-notification" when delivering Web Push in GeckoView r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D76218
This commit is contained in:
parent
99cc4bf60e
commit
b4862ab01a
@ -47,6 +47,15 @@ const GeckoViewPushController = {
|
||||
|
||||
const [url, principal] = createScopeAndPrincipal(scope);
|
||||
|
||||
// Grant this since there is no way for the worker
|
||||
// to prompt for permission.
|
||||
Services.perms.addFromPrincipal(
|
||||
principal,
|
||||
"desktop-notification",
|
||||
Services.perms.ALLOW_ACTION,
|
||||
Services.perms.EXPIRE_SESSION
|
||||
);
|
||||
|
||||
if (!data) {
|
||||
PushNotifier.notifyPush(url, principal);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user