diff options
Diffstat (limited to 'remote/shared/messagehandler')
6 files changed, 15 insertions, 18 deletions
diff --git a/remote/shared/messagehandler/MessageHandler.sys.mjs b/remote/shared/messagehandler/MessageHandler.sys.mjs index 18ec6b820c..61c8b5c40e 100644 --- a/remote/shared/messagehandler/MessageHandler.sys.mjs +++ b/remote/shared/messagehandler/MessageHandler.sys.mjs @@ -215,7 +215,7 @@ export class MessageHandler extends EventEmitter { /** * Retrieve all module classes matching the moduleName and destination. - * See `getAllModuleClasses` (ModuleCache.jsm) for more details. + * See `getAllModuleClasses` (ModuleCache.sys.mjs) for more details. * * @param {string} moduleName * The name of the module. @@ -267,11 +267,8 @@ export class MessageHandler extends EventEmitter { * provided to this MessageHandler on startup. Implementation is specific to each MessageHandler class. * * By default the implementation is a no-op. - * - * @param {Array<SessionDataItem>} sessionDataItems - * Initial session data items for this MessageHandler. */ - async initialize(sessionDataItems) {} + async initialize() {} /** * Returns the module path corresponding to this MessageHandler class. @@ -297,7 +294,7 @@ export class MessageHandler extends EventEmitter { * * Needs to be implemented in the sub class. */ - static getIdFromContext(context) { + static getIdFromContext() { throw new Error("Not implemented"); } @@ -306,7 +303,7 @@ export class MessageHandler extends EventEmitter { * * Needs to be implemented in the sub class. */ - forwardCommand(command) { + forwardCommand() { throw new Error("Not implemented"); } @@ -316,7 +313,7 @@ export class MessageHandler extends EventEmitter { * * Needs to be implemented in the sub class. */ - matchesContext(contextDescriptor) { + matchesContext() { throw new Error("Not implemented"); } diff --git a/remote/shared/messagehandler/Module.sys.mjs b/remote/shared/messagehandler/Module.sys.mjs index 30b26938e2..c526c7ce6c 100644 --- a/remote/shared/messagehandler/Module.sys.mjs +++ b/remote/shared/messagehandler/Module.sys.mjs @@ -61,12 +61,12 @@ export class Module { * * @param {string} name * Name of the event. - * @param {object} payload + * @param {object} _payload * The event's payload. * @returns {object} * The modified event payload. */ - interceptEvent(name, payload) { + interceptEvent(name, _payload) { throw new Error( `Could not intercept event ${name}, interceptEvent is not implemented in windowglobal-in-root module` ); diff --git a/remote/shared/messagehandler/RootMessageHandler.sys.mjs b/remote/shared/messagehandler/RootMessageHandler.sys.mjs index 06a8cd6f18..ce571c3c12 100644 --- a/remote/shared/messagehandler/RootMessageHandler.sys.mjs +++ b/remote/shared/messagehandler/RootMessageHandler.sys.mjs @@ -51,7 +51,7 @@ export class RootMessageHandler extends MessageHandler { * The ROOT MessageHandler is unique for a given MessageHandler network * (ie for a given sessionId). Reuse the type as context id here. */ - static getIdFromContext(context) { + static getIdFromContext() { return RootMessageHandler.type; } diff --git a/remote/shared/messagehandler/sessiondata/SessionDataReader.sys.mjs b/remote/shared/messagehandler/sessiondata/SessionDataReader.sys.mjs index 6d5ea08e59..f7c91e6bbf 100644 --- a/remote/shared/messagehandler/sessiondata/SessionDataReader.sys.mjs +++ b/remote/shared/messagehandler/sessiondata/SessionDataReader.sys.mjs @@ -18,7 +18,7 @@ ChromeUtils.defineLazyGetter(lazy, "sharedData", () => { /** * Returns a snapshot of the session data map, which is cloned from the - * sessionDataMap singleton of SessionData.jsm. + * sessionDataMap singleton of SessionData.sys.mjs. * * @returns {Map.<string, Array<SessionDataItem>>} * Map of session id to arrays of SessionDataItems. diff --git a/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/retry.sys.mjs b/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/retry.sys.mjs index f7b2279018..3022744e7c 100644 --- a/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/retry.sys.mjs +++ b/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/retry.sys.mjs @@ -27,7 +27,7 @@ class RetryModule extends Module { // processes. const uri = this.messageHandler.window.document.baseURI; if (!uri.includes("example.net")) { - await new Promise(r => {}); + await new Promise(() => {}); } return { ...params }; @@ -37,7 +37,7 @@ class RetryModule extends Module { async blockedOneTime(params) { callsToBlockedOneTime++; if (callsToBlockedOneTime < 2) { - await new Promise(r => {}); + await new Promise(() => {}); } // Return: @@ -51,7 +51,7 @@ class RetryModule extends Module { async blockedTenTimes(params) { callsToBlockedTenTimes++; if (callsToBlockedTenTimes < 11) { - await new Promise(r => {}); + await new Promise(() => {}); } // Return: @@ -65,7 +65,7 @@ class RetryModule extends Module { async blockedElevenTimes(params) { callsToBlockedElevenTimes++; if (callsToBlockedElevenTimes < 12) { - await new Promise(r => {}); + await new Promise(() => {}); } // Return: diff --git a/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/windowglobaltoroot.sys.mjs b/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/windowglobaltoroot.sys.mjs index 815a836d9c..1d9238f1bc 100644 --- a/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/windowglobaltoroot.sys.mjs +++ b/remote/shared/messagehandler/test/browser/resources/modules/windowglobal/windowglobaltoroot.sys.mjs @@ -17,7 +17,7 @@ class WindowGlobalToRootModule extends Module { * Commands */ - testHandleCommandToRoot(params, destination) { + testHandleCommandToRoot() { return this.messageHandler.handleCommand({ moduleName: "windowglobaltoroot", commandName: "getValueFromRoot", @@ -27,7 +27,7 @@ class WindowGlobalToRootModule extends Module { }); } - testSendRootCommand(params, destination) { + testSendRootCommand() { return this.messageHandler.sendRootCommand({ moduleName: "windowglobaltoroot", commandName: "getValueFromRoot", |