Bug 775199 - Review comment. r=mounir

This commit is contained in:
Gregor Wagner 2012-08-01 13:51:54 -07:00
Родитель 90a3c93f93
Коммит 58deebc6b0
1 изменённых файлов: 1 добавлений и 6 удалений

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

@ -453,12 +453,7 @@ ContactManager.prototype = {
"Contact:Save:Return:OK", "Contact:Save:Return:KO",
"Contact:Remove:Return:OK", "Contact:Remove:Return:KO"]);
let principal = aWindow.document.nodePrincipal;
let secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
let perm = principal == secMan.getSystemPrincipal()
? Ci.nsIPermissionManager.ALLOW_ACTION
: Services.perms.testExactPermissionFromPrincipal(principal, "contacts");
let perm = Services.perms.testExactPermissionFromPrincipal(aWindow.document.nodePrincipal, "contacts");
//only pages with perm set can use the contacts
this.hasPrivileges = perm == Ci.nsIPermissionManager.ALLOW_ACTION;