зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1712754 - Do not autogrant permissions in GV push notification code. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D116293
This commit is contained in:
Родитель
bbdf0480b8
Коммит
eaaaa8490a
|
@ -46,14 +46,14 @@ 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 (
|
||||
Services.perms.testPermissionFromPrincipal(
|
||||
principal,
|
||||
"desktop-notification"
|
||||
) != Services.perms.ALLOW_ACTION
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
PushNotifier.notifyPush(url, principal, "");
|
||||
|
|
Загрузка…
Ссылка в новой задаче