зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
78ec788506
Коммит
4f11cdabb3
|
@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче