mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1826705 - Make destroy method of MessageHandler modules optional. r=jdescottes,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D176294
This commit is contained in:
parent
664b953b47
commit
acb6cab567
@ -8,12 +8,15 @@ const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
|
||||
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "disabledExperimentalAPI", () => {
|
||||
return !Services.prefs.getBoolPref("remote.experimental.enabled");
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "logger", () => lazy.Log.get());
|
||||
|
||||
export class Module {
|
||||
#messageHandler;
|
||||
|
||||
@ -29,11 +32,11 @@ export class Module {
|
||||
|
||||
/**
|
||||
* Clean-up the module instance.
|
||||
*
|
||||
* It's required to be implemented in the sub class.
|
||||
*/
|
||||
destroy() {
|
||||
throw new Error("Not implemented");
|
||||
lazy.logger.warn(
|
||||
`Module ${this.constructor.name} is missing a destroy method`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user