Skip to content

Commit 74f1e8f

Browse files
committed
Bug 1991124 - Fix remaining ESlint require-jsdoc issues that had been recently introduced. r=frontend-codestyle-reviewers,Gijs,mconley
Differential Revision: https://phabricator.services.mozilla.com/D266634 UltraBlame original commit: ff3eb5d6dde3085115047faff0eaa89750f71d7e
1 parent ec6b2b9 commit 74f1e8f

File tree

7 files changed

+27
-12
lines changed

7 files changed

+27
-12
lines changed

browser/components/backup/tests/xpcshell/test_PreferencesBackupResource.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ add_task(async function test_backup_private_browsing() {
276276

277277

278278

279+
280+
279281
async function checkPrefsJsHasValidRecoveryTime(prefsJsPath) {
280282
Assert.equal(
281283
Services.prefs.getPrefType("browser.backup.profile-restoration-date"),

browser/components/mozcachedohttp/MozCachedOHTTPProtocolHandler.sys.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ export class MozCachedOHTTPChannel {
547547
* Object containing extracted data, or null if invalid.
548548
* Returns null if URL parsing fails, no 'url' parameter found,
549549
* target URL is not HTTPS, or target URL is malformed.
550-
* @returns {nsIURI} returns.resourceURI - The decoded target image URI (HTTPS only)
551-
* @returns {string} returns.host - The moz-cached-ohttp host (e.g., "newtab-image")
550+
* `resourceURI` is the decoded target image URI (HTTPS only).
551+
* `host` is the moz-cached-ohttp host (e.g., "newtab-image").
552552
*/
553553
#extractHostAndResourceURI() {
554554
try {
@@ -1007,6 +1007,7 @@ export class MozCachedOHTTPChannel {
10071007
* @param {MessageChannelPort} cacheStreamUpdatePort
10081008
* MessagePort for sending error cleanup messages to the parent actor.
10091009
* Used to doom the cache entry when an error occurs during the request.
1010+
* @param {boolean} cacheOutputStream
10101011
*/
10111012
#cleanupCacheOnError(cacheStreamUpdatePort, cacheOutputStream) {
10121013
try {

browser/components/security/unexpectedScriptLoad.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ var UnexpectedScriptLoadPanel = new (class {
179179

180180

181181

182+
183+
182184
close(userDismissed) {
183185
this.console?.log("UnexpectedScriptLoadPanel is closing");
184186
if (userDismissed) {

browser/components/webrtc/content/webrtc-preview/webrtc-preview.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import { MozLitElement } from "chrome://global/content/lit-utils.mjs";
77

88
window.MozXULElement?.insertFTLIfNeeded("browser/webrtc-preview.ftl");
99

10+
/**
11+
* A class to handle a preview of a WebRTC stream.
12+
*/
1013
export class WebRTCPreview extends MozLitElement {
1114
static properties = {
1215
// The ID of the device to preview.

eslint-rollouts.config.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -466,15 +466,6 @@ export default [
466466
"uriloader/**",
467467
"widget/tests/file*.js",
468468
"widget/tests/window_composition_text_querycontent.xhtml",
469-
470-
// Bug 1991124 - Re-enable for these files which regressed whilst
471-
// require-jsdoc was accidentally not enabled.
472-
"browser/components/backup/tests/xpcshell/test_PreferencesBackupResource.js",
473-
"browser/components/mozcachedohttp/MozCachedOHTTPProtocolHandler.sys.mjs",
474-
"browser/components/security/unexpectedScriptLoad.js",
475-
"browser/components/webrtc/content/webrtc-preview/webrtc-preview.mjs",
476-
"toolkit/components/promiseworker/PromiseWorker.sys.mjs",
477-
"toolkit/modules/AppServicesTracing.sys.mjs",
478469
],
479470
rules: mozilla.turnOff(mozilla.configs["flat/require-jsdoc"].rules),
480471
},

toolkit/components/promiseworker/PromiseWorker.sys.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ BasePromiseWorker.prototype = {
458458
* An error that has been serialized by the worker.
459459
*
460460
* @class
461+
* @param {object} data
461462
*/
462463
function WorkerError(data) {
463464
this.data = data;

toolkit/modules/AppServicesTracing.sys.mjs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ class CallbackList {
5454
*
5555
* If this changes the max level for the list, this returns the new max level otherwise it returns
5656
* undefined;
57+
*
58+
* @param {number} level
59+
* @param {(event: object) => void} callback
5760
*/
5861
add(level, callback) {
5962
const oldMaxLevel = this.maxLevel();
@@ -75,6 +78,8 @@ class CallbackList {
7578
*
7679
* If this changes the max level for the list, this returns the new max level otherwise it returns
7780
* undefined;
81+
*
82+
* @param {(event: object) => void} callback
7883
*/
7984
remove(callback) {
8085
const index = this.items.find(i => i.callback === callback);
@@ -97,6 +102,8 @@ class CallbackList {
97102
* Process an event using all items in this CallbackList.
98103
*
99104
* The callbacks for item >= `event.level` will be called.
105+
*
106+
* @param {object} event
100107
*/
101108
processEvent(event) {
102109
for (const item of this.items) {
@@ -271,6 +278,9 @@ function loggerEventHandler(event) {
271278

272279
/**
273280
* send output from a target to a Log.sys.jsm logger.
281+
*
282+
* @param {string} target
283+
* @param {any} log
274284
*/
275285
export function setupLoggerForTarget(target, log) {
276286
if (typeof log == "string") {
@@ -293,6 +303,9 @@ export function setupLoggerForTarget(target, log) {
293303
tracingEventHandler.register(target, tracing_level, loggerEventHandler);
294304
}
295305

306+
/**
307+
* Handles forwarding a log.
308+
*/
296309
class LogForwarder extends EventSink {
297310
static PREF_CRATES_TO_FORWARD = "toolkit.rust-components.logging.crates";
298311

@@ -341,7 +354,9 @@ class LogForwarder extends EventSink {
341354
}
342355

343356
/**
344-
* Parse the tracing pref value
357+
* Parse the tracing pref value.
358+
*
359+
* @param {string} prefValue
345360
*/
346361
parsePrefValue(prefValue) {
347362
const parsed = {

0 commit comments

Comments
 (0)