Bug 1568521 Tracking protection doorhanger's Enable/Disable states don't work r=VladBaicu

Now using lastURI instead of principal and now we are using the right functions in order to test permissions.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrei Lazar 2019-07-24 16:00:32 +00:00
Родитель 78ec788506
Коммит 4f11cdabb3
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -145,6 +145,7 @@ var PermissionsHelper = {
* @return A permission value defined in nsIPermissionManager.
*/
getPermission: function getPermission(aPrincipal, aType) {
let aURI = BrowserApp.selectedBrowser.lastURI;
// Password saving isn't a nsIPermissionManager permission type, so handle
// it seperately.
if (aType == "password") {
@ -164,10 +165,10 @@ var PermissionsHelper = {
// Geolocation consumers use testExactPermissionForPrincipal
if (aType == "geolocation") {
return Services.perms.testExactPermissionForPrincipal(aPrincipal, aType);
return Services.perms.testExactPermissionFromPrincipal(aPrincipal, aType);
}
return Services.perms.testPermissionForPrincipal(aPrincipal, aType);
return Services.perms.testPermissionFromPrincipal(aPrincipal, aType);
},
/**