mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1037128 - Regression: Contact API usage is being prompt on webpages r=fabrice
This commit is contained in:
parent
8b1b2270f8
commit
dbe64e615e
@ -248,10 +248,16 @@ ContactManager.prototype = {
|
|||||||
let permValue =
|
let permValue =
|
||||||
Services.perms.testExactPermissionFromPrincipal(principal, type);
|
Services.perms.testExactPermissionFromPrincipal(principal, type);
|
||||||
if (permValue == Ci.nsIPermissionManager.ALLOW_ACTION) {
|
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;
|
return;
|
||||||
} else if (permValue == Ci.nsIPermissionManager.DENY_ACTION) {
|
|
||||||
aCancelCallback();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create an array with a single nsIContentPermissionType element.
|
// Create an array with a single nsIContentPermissionType element.
|
||||||
@ -425,7 +431,7 @@ ContactManager.prototype = {
|
|||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
let cancelCallback = function() {
|
let cancelCallback = function() {
|
||||||
Services.DOMRequest.fireError(request);
|
Services.DOMRequest.fireError(request, "");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.askPermission("revision", request, allowCallback, cancelCallback);
|
this.askPermission("revision", request, allowCallback, cancelCallback);
|
||||||
@ -442,7 +448,7 @@ ContactManager.prototype = {
|
|||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
let cancelCallback = function() {
|
let cancelCallback = function() {
|
||||||
Services.DOMRequest.fireError(request);
|
Services.DOMRequest.fireError(request, "");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.askPermission("count", request, allowCallback, cancelCallback);
|
this.askPermission("count", request, allowCallback, cancelCallback);
|
||||||
|
@ -5,11 +5,14 @@ skip-if = e10s
|
|||||||
[test_contacts_basics.html]
|
[test_contacts_basics.html]
|
||||||
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
||||||
[test_contacts_basics2.html]
|
[test_contacts_basics2.html]
|
||||||
|
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
||||||
[test_contacts_blobs.html]
|
[test_contacts_blobs.html]
|
||||||
|
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
||||||
[test_contacts_events.html]
|
[test_contacts_events.html]
|
||||||
[test_contacts_getall.html]
|
[test_contacts_getall.html]
|
||||||
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
||||||
[test_contacts_getall2.html]
|
[test_contacts_getall2.html]
|
||||||
|
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
|
||||||
[test_contacts_international.html]
|
[test_contacts_international.html]
|
||||||
[test_contacts_substringmatching.html]
|
[test_contacts_substringmatching.html]
|
||||||
[test_contacts_substringmatchingVE.html]
|
[test_contacts_substringmatchingVE.html]
|
||||||
|
Loading…
Reference in New Issue
Block a user