зеркало из https://github.com/mozilla/gecko-dev.git
Bug 775199 - Review comment. r=mounir
This commit is contained in:
Родитель
90a3c93f93
Коммит
58deebc6b0
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче