commit 57ff6db1041e5bc9ff4cf93ce9efcf176de1383e parent 350dc1db83b10c6e27d55a798ecb68c0432d7d40 Author: Mark Banner <standard8@mozilla.com> Date: Thu, 2 Oct 2025 10:38:38 +0000 Bug 1991124 - Fix ESLint require-jsdoc issues in profiles and taskbar tabs code. r=profiles-reviewers,mossop,nrishel Differential Revision: https://phabricator.services.mozilla.com/D266632 Diffstat:
9 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/browser/components/profiles/ProfilesChild.sys.mjs b/browser/components/profiles/ProfilesChild.sys.mjs @@ -4,4 +4,7 @@ import { RemotePageChild } from "resource://gre/actors/RemotePageChild.sys.mjs"; +/** + * Empty child actor as the Profiles page is handled in the parent. + */ export class ProfilesChild extends RemotePageChild {} diff --git a/browser/components/profiles/ProfilesParent.sys.mjs b/browser/components/profiles/ProfilesParent.sys.mjs @@ -249,6 +249,9 @@ ChromeUtils.defineESModuleGetters(lazy, { AddonManager: "resource://gre/modules/AddonManager.sys.mjs", }); +/** + * Actor implementation for the profile about pages. + */ export class ProfilesParent extends JSWindowActorParent { get tab() { const gBrowser = this.browsingContext.topChromeWindow.gBrowser; diff --git a/browser/components/profiles/SelectableProfile.sys.mjs b/browser/components/profiles/SelectableProfile.sys.mjs @@ -171,6 +171,7 @@ export class SelectableProfile { * If the avatar is custom, the return value will be the path to the file on * disk. * + * @param {string|number} size * @returns {string} Path to the current avatar. */ getAvatarPath(size) { diff --git a/browser/components/profiles/SelectableProfileService.sys.mjs b/browser/components/profiles/SelectableProfileService.sys.mjs @@ -57,6 +57,9 @@ const COMMAND_LINE_ACTIVATE = "profiles-activate"; const gSupportsBadging = "nsIMacDockSupport" in Ci || "nsIWinTaskbar" in Ci; +/** + * Handles listening to the channel requests. + */ class ChannelListener { #request = null; #imageListener = null; diff --git a/browser/components/profiles/content/avatarSelectionHelpers.mjs b/browser/components/profiles/content/avatarSelectionHelpers.mjs @@ -2,6 +2,8 @@ * 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/. */ +const MIN_SELECTION_SIZE = 48; + /** * This class is copied from https://searchfox.org/mozilla-central/source/browser/components/screenshots/overlayHelpers.mjs * with some slight modifications such as forcing the region to be a square. @@ -13,8 +15,6 @@ * will choose to return the "correct" value. For example, the left getter * returns the min of x1 and x2. The same goes for the other three getters. */ - -const MIN_SELECTION_SIZE = 48; export class Region { #x1; #x2; @@ -263,6 +263,9 @@ export class Region { } } +/** + * A class which saves the current view dimensions. + */ export class ViewDimensions { #height = null; #width = null; diff --git a/browser/components/taskbartabs/TaskbarTabsPin.sys.mjs b/browser/components/taskbartabs/TaskbarTabsPin.sys.mjs @@ -25,6 +25,7 @@ export const TaskbarTabsPin = { * Pins the provided Taskbar Tab to the taskbar. * * @param {TaskbarTab} aTaskbarTab - A Taskbar Tab to pin to the taskbar. + * @param {TaskbarTabsRegistry} aRegistry - The registry to track pin resources with. * @returns {Promise} Resolves once finished. */ async pinTaskbarTab(aTaskbarTab, aRegistry) { @@ -51,6 +52,7 @@ export const TaskbarTabsPin = { * Unpins the provided Taskbar Tab from the taskbar. * * @param {TaskbarTab} aTaskbarTab - The Taskbar Tab to unpin from the taskbar. + * @param {TaskbarTabsRegistry} aRegistry - remove pinned resource tracking from. * @returns {Promise} Resolves once finished. */ async unpinTaskbarTab(aTaskbarTab, aRegistry) { @@ -121,6 +123,7 @@ async function createTaskbarIconFromFavicon(aTaskbarTab) { * * @param {TaskbarTab} aTaskbarTab - The Taskbar Tab to generate a shortcut for. * @param {nsIFile} aFileIcon - The icon file to use for the shortcut. + * @param {TaskbarTabsRegistry} aRegistry - The registry used to save the shortcut path. * @returns {Promise<string>} The path to the created shortcut. */ async function createShortcut(aTaskbarTab, aFileIcon, aRegistry) { diff --git a/browser/components/taskbartabs/TaskbarTabsRegistry.sys.mjs b/browser/components/taskbartabs/TaskbarTabsRegistry.sys.mjs @@ -141,6 +141,8 @@ class TaskbarTab { * Always use TaskbarTabsRegistry.patchTaskbarTab instead. Aside * from calling into this, it notifies other objects (especially * the saver) about the change. + * + * @param {object} aPatch - An object with properties to change. */ _applyPatch(aPatch) { if ("shortcutRelativePath" in aPatch) { diff --git a/browser/components/taskbartabs/TaskbarTabsUtils.sys.mjs b/browser/components/taskbartabs/TaskbarTabsUtils.sys.mjs @@ -148,6 +148,9 @@ function scaleImage(aImgContainer) { return aImgContainer; } +/** + * A channel listener to aid with receiving image data. + */ class ChannelListener { #request = null; #imageListener = null; diff --git a/eslint-rollouts.config.mjs b/eslint-rollouts.config.mjs @@ -475,16 +475,8 @@ export default [ "browser/components/genai/content/smart-assist.mjs", "browser/components/genai/tests/browser/browser_page_assist_actors.js", "browser/components/mozcachedohttp/MozCachedOHTTPProtocolHandler.sys.mjs", - "browser/components/profiles/ProfilesChild.sys.mjs", - "browser/components/profiles/ProfilesParent.sys.mjs", - "browser/components/profiles/SelectableProfile.sys.mjs", - "browser/components/profiles/SelectableProfileService.sys.mjs", - "browser/components/profiles/content/avatarSelectionHelpers.mjs", "browser/components/search/content/autocomplete-popup.js", "browser/components/security/unexpectedScriptLoad.js", - "browser/components/taskbartabs/TaskbarTabsPin.sys.mjs", - "browser/components/taskbartabs/TaskbarTabsRegistry.sys.mjs", - "browser/components/taskbartabs/TaskbarTabsUtils.sys.mjs", "browser/components/urlbar/SearchModeSwitcher.sys.mjs", "browser/components/urlbar/UrlbarProviderAutofill.sys.mjs", "browser/components/urlbar/UrlbarResult.sys.mjs",