Name Description Size
Errors.jsm @param {(string|Error)=} x Optional string describing error situation or Error instance to propagate. 2156
EventsDispatcher.jsm Helper to listen to internal events which rely on SessionData. In order to support the EventsDispatcher, a module emitting internal events should subscribe and unsubscribe to those events based on SessionData updates and should use the "internal-event" SessionData category. 3782
MessageHandler.jsm A ContextDescriptor object provides information to decide if a broadcast or a session data item should be applied to a specific MessageHandler context. TODO: At the moment we only support one value: { type: "all", id: "all" }, but the format of the ContextDescriptor object is designed to fit more complex values. As soon as we start supporting broadcasts targeting only a part of the context tree, we will add additional context types. This work will begin with Bug 1725111, where we will support filtering on a single navigable. It will be later expanded to filter on a worker, a webextension, a process etc... @typedef {Object} ContextDescriptor @property {ContextDescriptorType} type The type of context @property {String=} id Unique id of a given context for the provided type. For ContextDescriptorType.All, id can be ommitted. For ContextDescriptorType.TopBrowsingContext, the id should be a WindowManager UUID created by `getIdForBrowser`. 10132
MessageHandlerRegistry.jsm Map of MessageHandler type to MessageHandler subclass. 7810
Module.jsm Create a new module instance. @param {MessageHandler} messageHandler The MessageHandler instance which owns this Module instance. 3335
ModuleCache.jsm ModuleCache instances are dedicated to lazily create and cache the instances of all the modules related to a specific MessageHandler instance. ModuleCache also implements the logic to resolve the path to the file for a given module, which depends both on the current MessageHandler context and on the expected destination. In order to implement module logic in any context, separate module files should be created for each situation. For instance, for a given module, - ${MODULES_FOLDER}/root/{ModuleName}.jsm contains the implementation for commands intended for the destination ROOT, and will be created for a ROOT MessageHandler only. Typically, they will run in the parent process. - ${MODULES_FOLDER}/windowglobal/{ModuleName}.jsm contains the implementation for commands intended for a WINDOW_GLOBAL destination, and will be created for a WINDOW_GLOBAL MessageHandler only. Those will usually run in a content process. - ${MODULES_FOLDER}/windowglobal-in-root/{ModuleName}.jsm also handles commands intended for a WINDOW_GLOBAL destination, but they will be created for the ROOT MessageHandler and will run in the parent process. This can be useful if some code has to be executed in the parent process, even though the final destination is a WINDOW_GLOBAL. - And so on, as more MessageHandler types get added, more combinations will follow based on the same pattern: - {contextName}/{ModuleName}.jsm - or {destinationType}-in-{currentType}/{ModuleName}.jsm All those implementations are optional. If a module cannot be found, based on the logic detailed above, the MessageHandler will assume that the command should simply be forwarded to the next layer of the network. 8041
RootMessageHandler.jsm A RootMessageHandler is the root node of a MessageHandler network. It lives in the parent process. It can forward commands to MessageHandlers in other layers (at the moment WindowGlobalMessageHandlers in content processes). 4848
RootMessageHandlerRegistry.jsm In the parent process, only one Root MessageHandlerRegistry should ever be created. All consumers can safely use this singleton to retrieve the Root registry and from there either create or retrieve Root MessageHandler instances for a specific session. 903
sessiondata 2
test 2
transports 3
WindowGlobalMessageHandler.jsm A WindowGlobalMessageHandler is dedicated to debugging a single window global. It follows the lifecycle of the corresponding window global and will therefore not survive any navigation. This MessageHandler cannot forward commands further to other MessageHandlers and represents a leaf node in a MessageHandler network. 3873