Files
sousa-gecko/remote/webdriver-bidi/modules/ModuleRegistry.sys.mjs
T
Nazım Can Altınova 4f5371ca38 Bug 1869522 - [bidi] Add a moz:profiler module with start/stop methods r=Sasha,jdescottes
Adds a new "moz:profiler" vendor-prefixed WebDriver BiDi module that wraps
the Gecko profiler:
  - moz:profiler.start: either { preset } or
                        { entries, interval, features, threads }, plus an
                        optional activeContext
  - moz:profiler.stop({ discard? }) -> { path }
  - moz:profiler.isActive() -> { active }

start accepts either a preset name (read from prefs-presets.sys.mjs) or the
full set of recording options. stop saves the profile to a uniquely named
file in the preferred downloads directory and returns its path, unless
discard is true.

Differential Revision: https://phabricator.services.mozilla.com/D196162
2026-06-25 09:32:36 +00:00

91 lines
3.7 KiB
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
export const modules = {
root: {
moz: {},
},
"windowglobal-in-root": {
moz: {},
},
windowglobal: {
moz: {},
},
};
// eslint-disable-next-line mozilla/lazy-getter-object-name
ChromeUtils.defineESModuleGetters(modules.root, {
_configuration:
"chrome://remote/content/webdriver-bidi/modules/root/_configuration.sys.mjs",
browser:
"chrome://remote/content/webdriver-bidi/modules/root/browser.sys.mjs",
browsingContext:
"chrome://remote/content/webdriver-bidi/modules/root/browsingContext.sys.mjs",
emulation:
"chrome://remote/content/webdriver-bidi/modules/root/emulation.sys.mjs",
input: "chrome://remote/content/webdriver-bidi/modules/root/input.sys.mjs",
log: "chrome://remote/content/webdriver-bidi/modules/root/log.sys.mjs",
network:
"chrome://remote/content/webdriver-bidi/modules/root/network.sys.mjs",
permissions:
"chrome://remote/content/webdriver-bidi/modules/root/permissions.sys.mjs",
script: "chrome://remote/content/webdriver-bidi/modules/root/script.sys.mjs",
session:
"chrome://remote/content/webdriver-bidi/modules/root/session.sys.mjs",
storage:
"chrome://remote/content/webdriver-bidi/modules/root/storage.sys.mjs",
webExtension:
"chrome://remote/content/webdriver-bidi/modules/root/webExtension.sys.mjs",
});
// eslint-disable-next-line mozilla/lazy-getter-object-name
ChromeUtils.defineESModuleGetters(modules.root.moz, {
debugging:
"chrome://remote/content/webdriver-bidi/modules/root/moz/debugging.sys.mjs",
profiler:
"chrome://remote/content/webdriver-bidi/modules/root/moz/profiler.sys.mjs",
});
// eslint-disable-next-line mozilla/lazy-getter-object-name
ChromeUtils.defineESModuleGetters(modules["windowglobal-in-root"], {
browsingContext:
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/browsingContext.sys.mjs",
input:
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/input.sys.mjs",
log: "chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/log.sys.mjs",
network:
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/network.sys.mjs",
script:
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/script.sys.mjs",
});
// eslint-disable-next-line mozilla/lazy-getter-object-name
ChromeUtils.defineESModuleGetters(modules["windowglobal-in-root"].moz, {
debugging:
"chrome://remote/content/webdriver-bidi/modules/windowglobal-in-root/moz/debugging.sys.mjs",
});
// eslint-disable-next-line mozilla/lazy-getter-object-name
ChromeUtils.defineESModuleGetters(modules.windowglobal, {
_configuration:
"chrome://remote/content/webdriver-bidi/modules/windowglobal/_configuration.sys.mjs",
browsingContext:
"chrome://remote/content/webdriver-bidi/modules/windowglobal/browsingContext.sys.mjs",
emulation:
"chrome://remote/content/webdriver-bidi/modules/windowglobal/emulation.sys.mjs",
input:
"chrome://remote/content/webdriver-bidi/modules/windowglobal/input.sys.mjs",
log: "chrome://remote/content/webdriver-bidi/modules/windowglobal/log.sys.mjs",
network:
"chrome://remote/content/webdriver-bidi/modules/windowglobal/network.sys.mjs",
script:
"chrome://remote/content/webdriver-bidi/modules/windowglobal/script.sys.mjs",
});
// eslint-disable-next-line mozilla/lazy-getter-object-name
ChromeUtils.defineESModuleGetters(modules.windowglobal.moz, {
debugging:
"chrome://remote/content/webdriver-bidi/modules/windowglobal/moz/debugging.sys.mjs",
});