Name Description Size
browsing-context-helpers.sys.mjs Retrieve the addon id corresponding to a given window global. This is usually extracted from the principal, but in case we are dealing with a DevTools webextension fallback window, the addon id will be available in the URL. @param {WindowGlobalChild|WindowGlobalParent} windowGlobal The WindowGlobal from which we want to extract the addonId. Either a WindowGlobalParent or a WindowGlobalChild depending on where this helper is used from. @return {String} Returns the addon id if any could found, null otherwise. 18182
moz.build 470
session-context.js Create the SessionContext used by the Browser Toolbox and Browser Console. This context means debugging everything. The whole browser: - all processes: parent and content, - all privileges: privileged/chrome and content/web, - all components/targets: HTML documents, processes, workers, add-ons,... @param {Object} config An object with optional configuration. Only supports "isBrowserToolboxFission" attribute which provides the value of the devtools.browsertoolbox.fission preference on the client. 9260
SessionDataHelpers.jsm Helper module alongside WatcherRegistry, which focus on updating the "sessionData" object. This object is shared across processes and threads and have to be maintained in all these runtimes. 6655
target-helpers
WatcherRegistry.sys.mjs Helper module around `sharedData` object that helps storing the state of all observed Targets and Resources, that, for all DevTools connections. Here is a few words about the C++ implementation of sharedData: https://searchfox.org/mozilla-central/rev/bc3600def806859c31b2c7ac06e3d69271052a89/dom/ipc/SharedMap.h#30-55 We may have more than one DevToolsServer and one server may have more than one client. This module will be the single source of truth in the parent process, in order to know which targets/resources are currently observed. It will also be used to declare when something starts/stops being observed. `sharedData` is a platform API that helps sharing JS Objects across processes. We use it in order to communicate to the content process which targets and resources should be observed. Content processes read this data only once, as soon as they are created. It isn't used beyond this point. Content processes are not going to update it. We will notify about changes in observed targets and resources for already running processes by some other means. (Via JS Window Actor queries "DevTools:(un)watch(Resources|Target)") This means that only this module will update the "DevTools:watchedPerWatcher" value. From the parent process, we should be going through this module to fetch the data, while from the content process, we will read `sharedData` directly. 14373