summaryrefslogtreecommitdiffstats
path: root/devtools/client/performance-new/popup
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/performance-new/popup
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/performance-new/popup')
-rw-r--r--devtools/client/performance-new/popup/logic.sys.mjs15
-rw-r--r--devtools/client/performance-new/popup/menu-button.sys.mjs8
2 files changed, 11 insertions, 12 deletions
diff --git a/devtools/client/performance-new/popup/logic.sys.mjs b/devtools/client/performance-new/popup/logic.sys.mjs
index 174163d54b..9c10987ec1 100644
--- a/devtools/client/performance-new/popup/logic.sys.mjs
+++ b/devtools/client/performance-new/popup/logic.sys.mjs
@@ -36,6 +36,13 @@ const lazy = createLazyLoaders({
*/
function selectElementsInPanelview(panelview) {
const document = panelview.ownerDocument;
+
+ // Forcefully cast the window to the type Window
+ /** @type {any} */
+ const windowAny = document.defaultView;
+ /** @type {Window} */
+ const window = windowAny;
+
/**
* Get an element or throw an error if it's not found. This is more friendly
* for TypeScript.
@@ -54,16 +61,10 @@ function selectElementsInPanelview(panelview) {
return element;
}
- // Forcefully cast the window to the type ChromeWindow.
- /** @type {any} */
- const chromeWindowAny = document.defaultView;
- /** @type {ChromeWindow} */
- const chromeWindow = chromeWindowAny;
-
return {
document,
panelview,
- window: chromeWindow,
+ window,
inactive: getElementById("PanelUI-profiler-inactive"),
active: getElementById("PanelUI-profiler-active"),
presetDescription: getElementById("PanelUI-profiler-content-description"),
diff --git a/devtools/client/performance-new/popup/menu-button.sys.mjs b/devtools/client/performance-new/popup/menu-button.sys.mjs
index f1aee09af4..3dfffb4098 100644
--- a/devtools/client/performance-new/popup/menu-button.sys.mjs
+++ b/devtools/client/performance-new/popup/menu-button.sys.mjs
@@ -32,10 +32,9 @@ const WIDGET_ID = "profiler-button";
/**
* Add the profiler button to the navbar.
*
- * @param {ChromeDocument} document The browser's document.
* @return {void}
*/
-function addToNavbar(document) {
+function addToNavbar() {
const { CustomizableUI } = lazy.CustomizableUI();
CustomizableUI.addWidgetToArea(WIDGET_ID, CustomizableUI.AREA_NAVBAR);
@@ -173,7 +172,7 @@ function initialize(toggleProfilerKeyShortcuts) {
/**
* @type {(event: { target: ChromeHTMLElement | XULElement }) => void}
*/
- onViewHiding(event) {
+ onViewHiding() {
// Clean-up the view. This removes all of the event listeners.
for (const fn of panelState.cleanup) {
fn();
@@ -292,8 +291,7 @@ function initialize(toggleProfilerKeyShortcuts) {
});
},
- // @ts-ignore - Bug 1674368
- onCommand: event => {
+ onCommand: () => {
if (Services.profiler.IsPaused()) {
// A profile is already being captured, ignore this event.
return;