mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1376128 - Use consistent return types for accessibility.service; r=automatedtester
accessibility.service is allowed to return undefined, but we should be explicit that this condition is allowed instead of relying on the default value of the service variable assigned on the first line. MozReview-Commit-ID: LrlnIba56v5 --HG-- extra : rebase_source : 1b66b6aa4393cb14b41bc67036d5d7296195be32
This commit is contained in:
parent
ef0966c800
commit
41af3d0aae
@ -21,14 +21,12 @@ XPCOMUtils.defineLazyModuleGetter(
|
||||
this, "clearInterval", "resource://gre/modules/Timer.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "service", () => {
|
||||
let service;
|
||||
try {
|
||||
service = Cc["@mozilla.org/accessibilityService;1"].getService(
|
||||
Ci.nsIAccessibilityService);
|
||||
return Cc["@mozilla.org/accessibilityService;1"]
|
||||
.getService(Ci.nsIAccessibilityService);
|
||||
} catch (e) {
|
||||
logger.warn("Accessibility module is not present");
|
||||
} finally {
|
||||
return service;
|
||||
return undefined;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user