Bug 1037128 - Regression: Contact API usage is being prompt on webpages r=fabrice

This commit is contained in:
Mark Finkle 2014-07-14 10:31:16 -07:00
parent d2b9b35879
commit c53bbe5218

View File

@ -248,10 +248,16 @@ ContactManager.prototype = {
let permValue =
Services.perms.testExactPermissionFromPrincipal(principal, type);
if (permValue == Ci.nsIPermissionManager.ALLOW_ACTION) {
aAllowCallback();
if (aAllowCallback) {
aAllowCallback();
}
return;
} else if (permValue == Ci.nsIPermissionManager.DENY_ACTION ||
permValue == Ci.nsIPermissionManager.UNKNOWN_ACTION) {
if (aCancelCallback) {
aCancelCallback();
}
return;
} else if (permValue == Ci.nsIPermissionManager.DENY_ACTION) {
aCancelCallback();
}
// Create an array with a single nsIContentPermissionType element.