diff --git a/dom/contacts/ContactManager.js b/dom/contacts/ContactManager.js index af3fd2c77f5d..e9ad7a6d7db2 100644 --- a/dom/contacts/ContactManager.js +++ b/dom/contacts/ContactManager.js @@ -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. @@ -425,7 +431,7 @@ ContactManager.prototype = { }.bind(this); let cancelCallback = function() { - Services.DOMRequest.fireError(request); + Services.DOMRequest.fireError(request, ""); }; this.askPermission("revision", request, allowCallback, cancelCallback); @@ -442,7 +448,7 @@ ContactManager.prototype = { }.bind(this); let cancelCallback = function() { - Services.DOMRequest.fireError(request); + Services.DOMRequest.fireError(request, ""); }; this.askPermission("count", request, allowCallback, cancelCallback); diff --git a/dom/contacts/tests/mochitest.ini b/dom/contacts/tests/mochitest.ini index d1612db8eb5d..1dcffd9ca417 100644 --- a/dom/contacts/tests/mochitest.ini +++ b/dom/contacts/tests/mochitest.ini @@ -5,11 +5,14 @@ skip-if = e10s [test_contacts_basics.html] skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_contacts_basics2.html] +skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_contacts_blobs.html] +skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_contacts_events.html] [test_contacts_getall.html] skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_contacts_getall2.html] +skip-if = (toolkit == 'gonk' && debug) #debug-only failure [test_contacts_international.html] [test_contacts_substringmatching.html] [test_contacts_substringmatchingVE.html]