Bug 1564588 - No longer persist third-party permission. r=johannh

Differential Revision: https://phabricator.services.mozilla.com/D40897

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan-Ivar Bruaroey 2019-08-09 20:18:38 +00:00
Родитель cb054b78ab
Коммит fafbd3a6b5
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -639,6 +639,10 @@ function prompt(aBrowser, aRequest) {
if (videoDevices.length && sharingScreen) {
camAllowed = false;
}
if (aRequest.isThirdPartyOrigin) {
camAllowed = false;
micAllowed = false;
}
let activeCamera;
let activeMic;
@ -1082,8 +1086,11 @@ function prompt(aBrowser, aRequest) {
},
};
// Don't offer "always remember" action in PB mode.
if (!PrivateBrowsingUtils.isBrowserPrivate(aBrowser)) {
// Don't offer "always remember" action in PB mode or from third party
if (
!PrivateBrowsingUtils.isBrowserPrivate(aBrowser) &&
!aRequest.isThirdPartyOrigin
) {
// Disable the permanent 'Allow' action if the connection isn't secure, or for
// screen/audio sharing (because we can't guess which window the user wants to
// share without prompting).