mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 922632 - use Services.jsm more in ContactManager.js; r=smaug
This commit is contained in:
parent
6a02ece98d
commit
313292b57f
@ -15,14 +15,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(Services, "DOMRequest", function() {
|
||||
return Cc["@mozilla.org/dom/dom-request-service;1"].getService(Ci.nsIDOMRequestService);
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "pm",
|
||||
"@mozilla.org/permissionmanager;1",
|
||||
"nsIPermissionManager");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
|
||||
"@mozilla.org/childprocessmessagemanager;1",
|
||||
"nsIMessageSender");
|
||||
@ -732,7 +724,7 @@ ContactManager.prototype = {
|
||||
// Shortcut for ALLOW_ACTION so we avoid a parent roundtrip
|
||||
let type = "contacts-" + access;
|
||||
let permValue =
|
||||
pm.testExactPermissionFromPrincipal(this._window.document.nodePrincipal, type);
|
||||
Services.perms.testExactPermissionFromPrincipal(this._window.document.nodePrincipal, type);
|
||||
if (permValue == Ci.nsIPermissionManager.ALLOW_ACTION) {
|
||||
aAllowCallback();
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user