commit c2693fb1687c4647473846a1ab15c48e08f63670 parent caf2698f2e35b2218c25b585a51df396649bb968 Author: Mark Banner <standard8@mozilla.com> Date: Mon, 22 Dec 2025 12:39:07 +0000 Bug 2004680 - Fix ESLint rule jsdoc/check-tag-names issues in toolkit. r=firefox-desktop-core-reviewers ,extension-reviewers,credential-management-reviewers,toolkit-telemetry-reviewers,Gijs,mkennedy,dimi,robwu Differential Revision: https://phabricator.services.mozilla.com/D275756 Diffstat:
59 files changed, 372 insertions(+), 365 deletions(-)
diff --git a/toolkit/actors/PictureInPictureChild.sys.mjs b/toolkit/actors/PictureInPictureChild.sys.mjs @@ -174,9 +174,8 @@ export class PictureInPictureLauncherChild extends JSWindowActorChild { * @param {object} pipObject.eventExtraKeys Extra telemetry keys to record * @param {boolean} autoFocus Autofocus the PiP window (default: true) * - * @return {Promise} - * @resolves {undefined} Once the new Picture-in-Picture window - * has been requested. + * @returns {Promise<void>} + * Resolved once the new Picture-in-Picture window has been requested. */ async togglePictureInPicture(pipObject, autoFocus = true) { let { video, reason, eventExtraKeys = {} } = pipObject; @@ -2084,10 +2083,8 @@ export class PictureInPictureChild extends JSWindowActorChild { * Tells the parent to close a pre-existing Picture-in-Picture * window. * - * @return {Promise} - * - * @resolves {undefined} Once the pre-existing Picture-in-Picture - * window has unloaded. + * @returns {Promise<void>} + * Resolves once the pre-existing Picture-in-Picture window has unloaded. */ async closePictureInPicture({ reason }) { let video = this.getWeakVideo(); @@ -2386,10 +2383,9 @@ export class PictureInPictureChild extends JSWindowActorChild { * @param videoRef {ContentDOMReference} * A reference to the video element that a Picture-in-Picture window * is being created for - * @return {Promise} - * @resolves {undefined} Once the player window has been set up - * properly, or a pre-existing Picture-in-Picture window has gone - * away due to an unexpected error. + * @returns {Promise<void>} + * Resolves once the player window has been set up properly, or a pre-existing + * Picture-in-Picture window has gone away due to an unexpected error. */ async setupPlayer(videoRef) { const video = await lazy.ContentDOMReference.resolve(videoRef); @@ -3201,7 +3197,7 @@ class PictureInPictureChildVideoWrapper { * OVERRIDABLE - calls the setCaptionContainerObserver() method defined in the site wrapper script. Runs a fallback implementation * if the method does not exist or if an error is thrown while calling it. This method is meant to listen for any cue changes in a * video's caption container and execute a callback function responsible for updating the pip window's text tracks container whenever - * a cue change is triggered {@see updatePiPTextTracks()}. + * a cue change is triggered {@link updatePiPTextTracks()}. * * @param {HTMLVideoElement} video * The originating video source element diff --git a/toolkit/components/asyncshutdown/nsAsyncShutdown.sys.mjs b/toolkit/components/asyncshutdown/nsAsyncShutdown.sys.mjs @@ -67,7 +67,7 @@ class PropertyBagConverter { * * @param {jsval} val JS value to convert. * @returns {nsIPropertyBag} A PropertyBag. - * @note function is converted to "(function)" and undefined to null. + * Note: function is converted to "(function)" and undefined to null. */ jsValueToPropertyBag(val) { let bag = Cc["@mozilla.org/hash-property-bag;1"].createInstance( diff --git a/toolkit/components/downloads/DownloadCore.sys.mjs b/toolkit/components/downloads/DownloadCore.sys.mjs @@ -94,9 +94,7 @@ function deserializeUnknownProperties(aObject, aSerializable, aFilterFn) { /** * Check if the file is a placeholder. * - * @return {Promise} - * @resolves {boolean} - * @rejects Never. + * @returns {Promise<boolean>} */ async function isPlaceholder(path) { try { @@ -210,7 +208,7 @@ Download.prototype = { * Progress percent, from 0 to 100. Intermediate values are reported only if * hasProgress is true. * - * @note You shouldn't rely on this property being equal to 100 to determine + * Note: You shouldn't rely on this property being equal to 100 to determine * whether the download is completed. You should use the individual * state properties instead. */ @@ -222,7 +220,7 @@ Download.prototype = { * * When hasProgress is false, this property is always zero. * - * @note This property may be different than the final file size on disk for + * Note: This property may be different than the final file size on disk for * downloads that are encoded during the network transfer. You can use * the "size" property of the DownloadTarget object to get the actual * size on disk once the download succeeds. @@ -233,7 +231,7 @@ Download.prototype = { * Number of bytes currently transferred. This value starts at zero, and may * be updated regardless of the value of hasProgress. * - * @note You shouldn't rely on this property being equal to totalBytes to + * Note: You shouldn't rely on this property being equal to totalBytes to * determine whether the download is completed. You should use the * individual state properties instead. This property may not be * updated during the last part of the download. @@ -369,12 +367,12 @@ Download.prototype = { * finished yet, this method waits for the cancellation to finish, then * restarts the download immediately. * - * @note If you need to start a new download from the same source, rather than + * Note: If you need to start a new download from the same source, rather than * restarting a failed or canceled one, you should create a separate * Download object with the same source as the current one. * - * @return {Promise} - * @resolves When the download has finished successfully. + * @returns {Promise<void>} + * Resolves when the download has finished successfully. * @rejects JavaScript exception if the download failed. */ start: function D_start() { @@ -638,8 +636,8 @@ Download.prototype = { /** * Perform the actions necessary when a Download succeeds. * - * @return {Promise} - * @resolves When the steps to take after success have completed. + * @returns {Promise<void>} + * Resolves when the steps to take after success have completed. * @rejects JavaScript exception if any of the operations failed. */ async _succeed() { @@ -708,8 +706,8 @@ Download.prototype = { * The file will be moved out of quarantine and the download will be * marked as succeeded. * - * @return {Promise} - * @resolves When the Download has been unblocked and succeeded. + * @returns {Promise<void>} + * Resolves when the Download has been unblocked and succeeded. * @rejects JavaScript exception if any of the operations failed. */ unblock() { @@ -839,8 +837,8 @@ Download.prototype = { * If a download was blocked but retained on disk this method can be used * to remove the file. * - * @return {Promise} - * @resolves When the Download's data has been removed. + * @returns {Promise<void>} + * Resolves when the Download's data has been removed. * @rejects JavaScript exception if any of the operations failed. */ confirmBlock() { @@ -899,8 +897,8 @@ Download.prototype = { * @param options.useSystemDefault * Optional value indicating how to handle launching this download, * this time only. Will override the associated mimeInfo.preferredAction - * @return {Promise} - * @resolves When the instruction to launch the file has been + * @returns {Promise<void>} + * Resolves when the instruction to launch the file has been * successfully given to the operating system. Note that * the OS might still take a while until the file is actually * launched. @@ -926,8 +924,8 @@ Download.prototype = { * will be saved. This may be called at any time, even if the download * failed or is currently in progress. * - * @return {Promise} - * @resolves When the instruction to open the containing folder has been + * @returns {Promise<void>} + * Resolves when the instruction to open the containing folder has been * successfully given to the operating system. Note that * the OS might still take a while until the folder is actually * opened. @@ -969,8 +967,8 @@ Download.prototype = { * to "cancel" happens asynchronously, and is consistent with the case where * the cancellation request could not be processed in time. * - * @return {Promise} - * @resolves When the cancellation process has finished. + * @returns {Promise<void>} + * Resolves when the cancellation process has finished. * @rejects Never. */ cancel: function D_cancel() { @@ -1043,8 +1041,8 @@ Download.prototype = { * still true when the download is restarted, partial data will be retained * during the new download attempt. * - * @return {Promise} - * @resolves When the partial data has been successfully removed. + * @returns {Promise<void>} + * Resolves when the partial data has been successfully removed. * @rejects JavaScript exception if the operation could not be completed. */ removePartialData() { @@ -1112,8 +1110,8 @@ Download.prototype = { * download is not controlled interactively, you should use the promise * returned by the "start" method instead, to check for success or failure. * - * @return {Promise} - * @resolves When the download has finished successfully. + * @returns {Promise<void>} + * Resolves when the download has finished successfully. * @rejects Never. */ whenSucceeded: function D_whenSucceeded() { @@ -1129,8 +1127,8 @@ Download.prototype = { * This allows the properties of the download to be updated in case the user * moved or deleted the target file or its associated ".part" file. * - * @return {Promise} - * @resolves When the operation has completed. + * @returns {Promise<void>} + * Resolves when the operation has completed. * @rejects Never. */ refresh() { @@ -1222,8 +1220,8 @@ Download.prototype = { * Whether any partially downloaded data should be removed after the * download has been stopped. * - * @return {Promise} - * @resolves When the operation has finished successfully. + * @returns {Promise<void>} + * Resolves when the operation has finished successfully. * @rejects JavaScript exception if an error occurred while removing the * partially downloaded data. */ @@ -1593,14 +1591,14 @@ DownloadSource.prototype = { * can adjust the network channel before it is opened, for example to change * the HTTP headers or to upload a stream as POST data. * - * @note If this is defined this object will not be serializable, thus the + * Note: If this is defined this object will not be serializable, thus the * Download object will not be persisted across sessions. * * @param aChannel * The nsIChannel to be adjusted. * - * @return {Promise} - * @resolves When the channel has been adjusted and can be opened. + * @returns {Promise<void>} + * Resolves when the channel has been adjusted and can be opened. * @rejects JavaScript exception that will cause the download to fail. */ adjustChannel: null, @@ -1610,7 +1608,7 @@ DownloadSource.prototype = { * will determine, if provided, if a download can progress or has to be * cancelled based on the HTTP status code of the network channel. * - * @note If this is defined this object will not be serializable, thus the + * Note: If this is defined this object will not be serializable, thus the * Download object will not be persisted across sessions. * * @param aDownload @@ -1858,8 +1856,8 @@ DownloadTarget.prototype = { /** * Sets the "exists" and "size" properties based on the actual file on disk. * - * @return {Promise} - * @resolves When the operation has finished successfully. + * @returns {Promise<void>} + * Resolves when the operation has finished successfully. * @rejects JavaScript exception. */ async refresh() { @@ -2033,7 +2031,7 @@ export var DownloadError = function (aProperties) { * These constants are used by the reputationCheckVerdict property and indicate * the detailed reason why a download is blocked. * - * @note These values should not be changed because they can be serialized. + * Note: These values should not be changed because they can be serialized. */ DownloadError.BLOCK_VERDICT_MALWARE = "Malware"; DownloadError.BLOCK_VERDICT_POTENTIALLY_UNWANTED = "PotentiallyUnwanted"; @@ -2187,8 +2185,8 @@ DownloadSaver.prototype = { * the names of the properties to set, and the value represents the * value to set. * - * @return {Promise} - * @resolves When the download has finished successfully. + * @returns {Promise<void>} + * Resolves when the download has finished successfully. * @rejects JavaScript exception if the download failed. */ async execute() { @@ -2212,8 +2210,8 @@ DownloadSaver.prototype = { * * @param canRemoveFinalTarget * True if can remove target file regardless of it being a placeholder. - * @return {Promise} - * @resolves When the operation has finished successfully. + * @returns {Promise<void>} + * Resolves when the operation has finished successfully. * @rejects Never. */ async removeData() {}, @@ -2717,8 +2715,8 @@ DownloadCopySaver.prototype = { * @param aSetPropertiesFn * Function provided to the "execute" method. * - * @return {Promise} - * @resolves When the reputation check and cleanup is complete. + * @returns {Promise<void>} + * Resolves when the reputation check and cleanup is complete. * @rejects DownloadError if the download should be blocked. */ async _checkReputationAndMove(aSetPropertiesFn) { diff --git a/toolkit/components/downloads/DownloadHistory.sys.mjs b/toolkit/components/downloads/DownloadHistory.sys.mjs @@ -52,8 +52,8 @@ export let DownloadHistory = { * Optional number that limits the amount of results the history query * may return. * - * @return {Promise} - * @resolves The requested DownloadHistoryList object. + * @returns {Promise<DownloadHistoryList>} + * Resolves to the requested DownloadHistoryList object. * @rejects JavaScript exception. */ async getList({ type = lazy.Downloads.PUBLIC, maxHistoryResults } = {}) { diff --git a/toolkit/components/downloads/DownloadIntegration.sys.mjs b/toolkit/components/downloads/DownloadIntegration.sys.mjs @@ -161,8 +161,8 @@ export var DownloadIntegration = { * @param list * DownloadList object to be initialized. * - * @return {Promise} - * @resolves When the list has been initialized. + * @returns {Promise<void>} + * Resolves when the list has been initialized. * @rejects JavaScript exception. */ async initializePublicDownloadList(list) { @@ -190,8 +190,8 @@ export var DownloadIntegration = { * serialized from the previous session. This list will be persisted * to disk during the session lifetime. * - * @return {Promise} - * @resolves When the list has been populated. + * @returns {Promise<void>} + * Resolves when the list has been populated. * @rejects JavaScript exception. */ async loadPublicDownloadListFromStore(list) { @@ -254,8 +254,8 @@ export var DownloadIntegration = { /** * Returns the system downloads directory asynchronously. * - * @return {Promise} - * @resolves The downloads directory string path. + * @returns {Promise<string>} + * Resolves to the downloads directory path. */ async getSystemDownloadsDirectory() { if (this._downloadsDirectory) { @@ -292,8 +292,8 @@ export var DownloadIntegration = { * @param {string} pref * The preference which contains the directory * - * @return {Promise} - * @resolves The directory string path. + * @returns {Promise<string>} + * Resolves to the directory path. */ async _getCustomDirectoryOrDownloads(pref) { let directoryPath = null; @@ -318,8 +318,8 @@ export var DownloadIntegration = { * behavior should match that of the synchronous function of the same name * exposed by nsIExternalHelperAppService. * - * @return {Promise} - * @resolves The downloads directory string path. + * @returns {Promise<string>} + * Resolves to the downloads directory path. */ async getPreferredDownloadsDirectory() { let directoryPath = null; @@ -346,8 +346,8 @@ export var DownloadIntegration = { /** * Returns the user screenshots directory asynchronously. * - * @return {Promise} - * @resolves The screenshots directory string path. + * @returns {Promise<string>} + * Resolves to the screenshots directory path. */ async getPreferredScreenshotsDirectory() { let directoryPath = null; @@ -387,8 +387,8 @@ export var DownloadIntegration = { /** * Returns the temporary downloads directory asynchronously. * - * @return {Promise} - * @resolves The downloads directory string path. + * @returns {Promise<string>} + * Resolves to the temporary downloads directory path. */ async getTemporaryDownloadsDirectory() { let directoryPath = null; @@ -408,8 +408,8 @@ export var DownloadIntegration = { * aParam aDownload * The download object. * - * @return {Promise} - * @resolves The boolean indicates to block downloads or not. + * @returns {Promise<boolean>} + * Resolves to a boolean which indicates to block downloads or not. */ shouldBlockForParentalControls(aDownload) { let isEnabled = @@ -438,14 +438,14 @@ export var DownloadIntegration = { * aParam aDownload * The download object. * - * @return {Promise} - * @resolves Object with the following properties: - * { - * shouldBlock: Whether the download should be blocked. - * verdict: Detailed reason for the block, according to the - * "Downloads.Error.BLOCK_VERDICT_" constants, or empty - * string if the reason is unknown. - * } + * @returns {Promise} + * Resolves to an object with the following properties: + * { + * shouldBlock: Whether the download should be blocked. + * verdict: Detailed reason for the block, according to the + * "Downloads.Error.BLOCK_VERDICT_" constants, or empty + * string if the reason is unknown. + * } */ shouldBlockForReputationCheck(aDownload) { let hash; @@ -726,8 +726,8 @@ export var DownloadIntegration = { * aParam aDownload * The Download object. * - * @return {Promise} - * @resolves When all the operations completed successfully. + * @returns {Promise<void>} + * Resolves when all the operations completed successfully. * @rejects JavaScript exception if any of the operations failed. */ async downloadDone(aDownload) { @@ -850,13 +850,12 @@ export var DownloadIntegration = { * Optional value indicating how to handle launching this download, * this time only. Will override the associated mimeInfo.preferredAction * - * @return {Promise} - * @resolves When the instruction to launch the file has been - * successfully given to the operating system. Note that - * the OS might still take a while until the file is actually - * launched. - * @rejects JavaScript exception if there was an error trying to launch - * the file. + * @returns {Promise<void>} + * Resolves when the instruction to launch the file has been successfully + * given to the operating system. Note that the OS might still take a while + * until the file is actually launched. + * @rejects JavaScript exception if there was an error trying to launch + * the file. */ async launchDownload(aDownload, { openWhere, useSystemDefault = null }) { let file = new lazy.FileUtils.File(aDownload.target.path); @@ -1036,7 +1035,7 @@ export var DownloadIntegration = { /** * Launches the specified file, unless overridden by regression tests. * - * @note Always use launchDownload() from the outside of this module, it is + * Note: Always use launchDownload() from the outside of this module, it is * both more powerful and safer. */ launchFile(file, mimeInfo) { @@ -1053,13 +1052,12 @@ export var DownloadIntegration = { * @param aFilePath * The path to the file. * - * @return {Promise} - * @resolves When the instruction to open the containing folder has been - * successfully given to the operating system. Note that - * the OS might still take a while until the folder is actually - * opened. - * @rejects JavaScript exception if there was an error trying to open - * the containing folder. + * @returns {Promise<void>} + * Resolves when the instruction to open the containing folder has been + * successfully given to the operating system. Note that the OS might + * still take a while until the folder is actually opened. + * @rejects JavaScript exception if there was an error trying to open + * the containing folder. */ async showContainingDirectory(aFilePath) { let file = new lazy.FileUtils.File(aFilePath); @@ -1097,8 +1095,8 @@ export var DownloadIntegration = { * Calls the directory service, create a downloads directory and returns an * nsIFile for the downloads directory. * - * @return {Promise} - * @resolves The directory string path. + * @returns {Promise<string>} + * Resolves to the directory path. */ _createDownloadsDirectory(aName) { // We read the name of the directory from the list of translated strings @@ -1142,8 +1140,8 @@ export var DownloadIntegration = { * @param aIsPrivate * True if the list is private, false otherwise. * - * @return {Promise} - * @resolves When the views and observers are added. + * @returns {Promise<void>} + * Reolves when the views and observers are added. */ addListObservers(aList, aIsPrivate) { DownloadObserver.registerView(aList, aIsPrivate); @@ -1173,8 +1171,8 @@ export var DownloadIntegration = { * Force a save on _store if it exists. Used to ensure downloads do not * persist after being sanitized on Android. * - * @return {Promise} - * @resolves When _store.save() completes. + * @returns {Promise<void>} + * Resolves when _store.save() completes. */ forceSave() { if (this._store) { diff --git a/toolkit/components/downloads/DownloadList.sys.mjs b/toolkit/components/downloads/DownloadList.sys.mjs @@ -154,8 +154,8 @@ export class DownloadList { * returned array does not change when downloads are added or removed, though * the Download objects it contains are still updated in real time. * - * @return {Promise} - * @resolves An array of Download objects. + * @returns {Promise} + * Resolves to an array of Download objects. * @rejects JavaScript exception. */ async getAll() { @@ -165,7 +165,7 @@ export class DownloadList { /** * Adds a new download to the end of the items list. * - * @note When a download is added to the list, its "onchange" event is + * Note: When a download is added to the list, its "onchange" event is * registered by the list, thus it cannot be used to monitor the * download. To receive change notifications for downloads that are * added to the list, use the addView method to register for @@ -174,8 +174,8 @@ export class DownloadList { * @param download * The Download object to add. * - * @return {Promise} - * @resolves When the download has been added. + * @returns {Promise<void>} + * Resolves when the download has been added. * @rejects JavaScript exception. */ async add(download) { @@ -196,8 +196,8 @@ export class DownloadList { * @param download * The Download object to remove. * - * @return {Promise} - * @resolves When the download has been removed. + * @returns {Promise<void>} + * Resolves when the download has been removed. * @rejects JavaScript exception. */ async remove(download) { @@ -374,7 +374,7 @@ export class DownloadCombinedList extends DownloadList { /** * Adds a new download to the end of the items list. * - * @note When a download is added to the list, its "onchange" event is + * Note: When a download is added to the list, its "onchange" event is * registered by the list, thus it cannot be used to monitor the * download. To receive change notifications for downloads that are * added to the list, use the addView method to register for @@ -383,8 +383,8 @@ export class DownloadCombinedList extends DownloadList { * @param download * The Download object to add. * - * @return {Promise} - * @resolves When the download has been added. + * @returns {Promise<void>} + * Resolves when the download has been added. * @rejects JavaScript exception. */ add(download) { @@ -415,8 +415,8 @@ export class DownloadCombinedList extends DownloadList { * @param download * The Download object to remove. * - * @return {Promise} - * @resolves When the download has been removed. + * @returns {Promise<void>} + * Resolves when the download has been removed. * @rejects JavaScript exception. */ remove(download) { @@ -506,8 +506,8 @@ export class DownloadSummary { * @param list * Underlying DownloadList whose contents should be summarized. * - * @return {Promise} - * @resolves When the view on the underlying list has been registered. + * @returns {Promise<void>} + * Resolves when the view on the underlying list has been registered. * @rejects JavaScript exception. */ async bindToList(list) { diff --git a/toolkit/components/downloads/DownloadStore.sys.mjs b/toolkit/components/downloads/DownloadStore.sys.mjs @@ -78,8 +78,8 @@ DownloadStore.prototype = { /** * Loads persistent downloads from the file to the list. * - * @return {Promise} - * @resolves When the operation finished successfully. + * @returns {Promise<void>} + * Resolves when the operation finished successfully. * @rejects JavaScript exception. */ load: function DS_load() { @@ -157,8 +157,8 @@ DownloadStore.prototype = { * * If an error occurs, the previous file is not deleted. * - * @return {Promise} - * @resolves When the operation finished successfully. + * @returns {Promise<void>} + * Resolves when the operation finished successfully. * @rejects JavaScript exception. */ save: function DS_save() { diff --git a/toolkit/components/downloads/DownloadUIHelper.sys.mjs b/toolkit/components/downloads/DownloadUIHelper.sys.mjs @@ -146,7 +146,8 @@ DownloadPrompter.prototype = { * @param path * String containing the full path to the file to be opened. * - * @resolves Boolean indicating whether the launch operation can continue. + * @returns {Promise<boolean>} + * Resolves to a boolean indicating whether the launch operation can continue. */ async confirmLaunchExecutable(path) { const kPrefSkipConfirm = "browser.download.skipConfirmLaunchExecutable"; diff --git a/toolkit/components/downloads/Downloads.sys.mjs b/toolkit/components/downloads/Downloads.sys.mjs @@ -86,8 +86,8 @@ export const Downloads = { * serializable representation of a DownloadSaver object. * } * - * @return {Promise} - * @resolves The newly created Download object. + * @returns {Promise} + * Resolves to the newly created Download object. * @rejects JavaScript exception. */ async createDownload(properties) { @@ -118,8 +118,8 @@ export const Downloads = { * private window. * } * - * @return {Promise} - * @resolves When the download has finished successfully. + * @returns {Promise<void>} + * Resolves when the download has finished successfully. * @rejects JavaScript exception if the download failed. */ async fetch(source, target, options) { @@ -146,8 +146,8 @@ export const Downloads = { * Downloads.ALL list are also added to either the Downloads.PUBLIC or * the Downloads.PRIVATE list based on their properties. * - * @return {Promise} - * @resolves The requested DownloadList or DownloadCombinedList object. + * @returns {Promise} + * Resolves to the requested DownloadList or DownloadCombinedList object. * @rejects JavaScript exception. */ async getList(type) { @@ -214,8 +214,8 @@ export const Downloads = { * @param type * This can be Downloads.PUBLIC, Downloads.PRIVATE, or Downloads.ALL. * - * @return {Promise} - * @resolves The requested DownloadList or DownloadCombinedList object. + * @returns {Promise} + * Resolves to the requested DownloadList or DownloadCombinedList object. * @rejects JavaScript exception. */ async getSummary(type) { @@ -254,8 +254,8 @@ export const Downloads = { * Android: * standard downloads directory i.e. /sdcard * - * @return {Promise} - * @resolves The downloads directory string path. + * @returns {Promise<string>} + * Resolves to the downloads directory path. */ getSystemDownloadsDirectory() { return lazy.DownloadIntegration.getSystemDownloadsDirectory(); @@ -265,8 +265,8 @@ export const Downloads = { * Returns the preferred downloads directory based on the user preferences * in the current profile asynchronously. * - * @return {Promise} - * @resolves The downloads directory string path. + * @returns {Promise<string>} + * Resolves to the downloads directory path. */ getPreferredDownloadsDirectory() { return lazy.DownloadIntegration.getPreferredDownloadsDirectory(); @@ -276,8 +276,8 @@ export const Downloads = { * Returns the preferred screenshots directory based on the user preferences * in the current profile asynchronously. * - * @return {Promise} - * @resolves The screenshots directory string path. + * @returns {Promise<string>} + * Resolves to the screenshots directory path. */ getPreferredScreenshotsDirectory() { return lazy.DownloadIntegration.getPreferredScreenshotsDirectory(); @@ -289,8 +289,8 @@ export const Downloads = { * with an external application. This may or may not be the system temporary * directory, based on the platform asynchronously. * - * @return {Promise} - * @resolves The downloads directory string path. + * @returns {Promise<string>} + * Resolves to the downloads directory string path. */ getTemporaryDownloadsDirectory() { return lazy.DownloadIntegration.getTemporaryDownloadsDirectory(); diff --git a/toolkit/components/downloads/test/unit/common_test_Download.js b/toolkit/components/downloads/test/unit/common_test_Download.js @@ -29,10 +29,10 @@ ChromeUtils.defineESModuleGetters(this, { * Creates and starts a new download, using either DownloadCopySaver or * DownloadLegacySaver based on the current test run. * - * @return {Promise} - * @resolves The newly created Download object. The download may be in progress - * or already finished. The promiseDownloadStopped function can be - * used to wait for completion. + * @returns {Promise} + * Resolves to the newly created Download object. The download may be in + * progress or already finished. The promiseDownloadStopped function can be + * used to wait for completion. * @rejects JavaScript exception. */ function promiseStartDownload(aSourceUrl) { @@ -55,8 +55,8 @@ function promiseStartDownload(aSourceUrl) { * @param expectedContents * String containing the octets that are expected in the file. * - * @return {Promise} - * @resolves When the properties have been verified. + * @returns {Promise<void>} + * Resolves when the properties have been verified. * @rejects JavaScript exception. */ var promiseVerifyTarget = async function (downloadTarget, expectedContents) { diff --git a/toolkit/components/downloads/test/unit/head.js b/toolkit/components/downloads/test/unit/head.js @@ -144,8 +144,8 @@ async function fileExists(path) { /** * Waits for pending events to be processed. * - * @return {Promise} - * @resolves When pending events have been processed. + * @returns {Promise<void>} + * Resolves when pending events have been processed. * @rejects Never. */ function promiseExecuteSoon() { @@ -157,8 +157,8 @@ function promiseExecuteSoon() { /** * Waits for a pending events to be processed after a timeout. * - * @return {Promise} - * @resolves When pending events have been processed. + * @returns {Promise<void>} + * Resolves when pending events have been processed. * @rejects Never. */ function promiseTimeout(aTime) { @@ -173,8 +173,8 @@ function promiseTimeout(aTime) { * @param aUrl * String containing the URI that will be visited. * - * @return {Promise} - * @resolves Array [aTime, aTransitionType] from page-visited places event. + * @returns {Promise} + * Resolves to an Array [aTime, aTransitionType] from page-visited places event. * @rejects Never. */ function promiseWaitForVisit(aUrl) { @@ -199,8 +199,8 @@ function promiseWaitForVisit(aUrl) { * String containing the URI for the download source, or null to use * httpUrl("source.txt"). * - * @return {Promise} - * @resolves The newly created Download object. + * @returns {Promise} + * Resolves to the newly created Download object. * @rejects JavaScript exception. */ function promiseNewDownload(aSourceUrl) { @@ -234,10 +234,10 @@ function promiseNewDownload(aSourceUrl) { * use to launch the target of the download. * } * - * @return {Promise} - * @resolves The Download object created as a consequence of controlling the - * download through the legacy nsITransfer interface. - * @rejects Never. The current test fails in case of exceptions. + * @returns {Promise} + * Resolves to the Download object created as a consequence of controlling the + * download through the legacy nsITransfer interface. + * @rejects Never. The current test fails in case of exceptions. */ function promiseStartLegacyDownload(aSourceUrl, aOptions) { let sourceURI = NetUtil.newURI(aSourceUrl || httpUrl("source.txt")); @@ -371,10 +371,10 @@ function promiseStartLegacyDownload(aSourceUrl, aOptions) { * String containing the URI for the download source, or null to use * httpUrl("interruptible_resumable.txt"). * - * @return {Promise} - * @resolves The Download object created as a consequence of controlling the - * download through the legacy nsITransfer interface. - * @rejects Never. The current test fails in case of exceptions. + * @returns {Promise} + * Resolves to rhe Download object created as a consequence of controlling the + * download through the legacy nsITransfer interface. + * @rejects Never. The current test fails in case of exceptions. */ function promiseStartExternalHelperAppServiceDownload(aSourceUrl) { let sourceURI = NetUtil.newURI( @@ -447,8 +447,8 @@ function promiseStartExternalHelperAppServiceDownload(aSourceUrl) { * @param aDownload * The Download object to wait upon. * - * @return {Promise} - * @resolves When the download has reached half of its progress. + * @returns {Promise<void>} + * Resolves when the download has reached half of its progress. * @rejects Never. */ function promiseDownloadMidway(aDownload) { @@ -478,8 +478,8 @@ function promiseDownloadMidway(aDownload) { * @param aDownload * The Download object to wait upon. * - * @return {Promise} - * @resolves When the download has transfered any number of bytes. + * @returns {Promise<void>} + * Resolves when the download has transfered any number of bytes. * @rejects Never. */ function promiseDownloadStarted(aDownload) { @@ -509,8 +509,8 @@ function promiseDownloadStarted(aDownload) { * @param aDownload * The Download object to wait upon. * - * @return {Promise} - * @resolves When the download succeeded or errored. + * @returns {Promise<void>} + * Resolves when the download succeeded or errored. * @rejects Never. */ function promiseDownloadFinished(aDownload) { @@ -536,8 +536,8 @@ function promiseDownloadFinished(aDownload) { * @param aDownload * The Download object to wait upon. * - * @return {Promise} - * @resolves When the download has finished successfully. + * @returns {Promise<void>} + * Resolves when the download has finished successfully. * @rejects JavaScript exception if the download failed. */ function promiseDownloadStopped(aDownload) { @@ -561,8 +561,8 @@ function promiseDownloadStopped(aDownload) { * @param aIsPrivate * True for the private list, false or undefined for the public list. * - * @return {Promise} - * @resolves The newly created DownloadList object. + * @returns {Promise} + * Resolves to the newly created DownloadList object. * @rejects JavaScript exception. */ function promiseNewList(aIsPrivate) { @@ -584,8 +584,8 @@ function promiseNewList(aIsPrivate) { * @param aExpectedContents * String containing the octets that are expected in the file. * - * @return {Promise} - * @resolves When the operation completes. + * @returns {Promise<void>} + * Resolves when the operation completes. * @rejects Never. */ async function promiseVerifyContents(aPath, aExpectedContents) { @@ -641,8 +641,8 @@ async function promiseVerifyContents(aPath, aExpectedContents) { * useLegacySaver: Boolean indicating whether to launch a legacy download. * } * - * @return {Promise} - * @resolves The newly created Download object, still in progress. + * @returns {Promise} + * Resolves to the newly created Download object, still in progress. * @rejects JavaScript exception. */ async function promiseStartDownload_tryToKeepPartialData({ @@ -680,8 +680,8 @@ async function promiseStartDownload_tryToKeepPartialData({ * is received, and waits for the worker thread of BackgroundFileSaver to * receive the data to be written to the ".part" file on disk. * - * @return {Promise} - * @resolves When the ".part" file has been written to disk. + * @returns {Promise<void>} + * Resolves when the ".part" file has been written to disk. * @rejects JavaScript exception. */ async function promisePartFileReady(aDownload) { @@ -716,8 +716,8 @@ async function promisePartFileReady(aDownload) { * verdict: nsIApplicationReputationService value indicating the reason for the block, * expectedError: Downloads.Error value indicating the expected error, * } - * @return {Promise} - * @resolves The reputation blocked download. + * @returns {Promise} + * Resolves when the reputation blocked download. * @rejects JavaScript exception. */ async function promiseBlockedDownload({ diff --git a/toolkit/components/downloads/test/unit/test_DownloadList.js b/toolkit/components/downloads/test/unit/test_DownloadList.js @@ -23,7 +23,7 @@ Services.prefs.setBoolPref( /** * Returns a Date in the past usable to add expirable visits. * - * @note Expiration ignores any visit added in the last 7 days, but it's + * Note: Expiration ignores any visit added in the last 7 days, but it's * better be safe against DST issues, by going back one day more. */ function getExpirableDate() { diff --git a/toolkit/components/downloads/test/unit/test_DownloadStore.js b/toolkit/components/downloads/test/unit/test_DownloadStore.js @@ -24,8 +24,7 @@ ChromeUtils.defineESModuleGetters(this, { * or undefined to use a non-existing temporary file. In this case, the * temporary file is deleted when the test file execution finishes. * - * @return {Promise} - * @resolves Array [ Newly created DownloadList , associated DownloadStore ]. + * @returns {Promise<[DownloadList, DownloadStore]>} * @rejects JavaScript exception. */ function promiseNewListAndStore(aStorePath) { diff --git a/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs b/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs @@ -1198,8 +1198,8 @@ export class ExperimentManager { /** * Generate the list of prefs a recipe will set. * - * @params {object} branch The recipe branch that will be enrolled. - * @params {boolean} isRollout Whether or not this recipe is a rollout. + * @param {object} branch The recipe branch that will be enrolled. + * @param {boolean} isRollout Whether or not this recipe is a rollout. * * @returns {object} An object with the following keys: * diff --git a/toolkit/components/nimbus/lib/PrefFlipsFeature.sys.mjs b/toolkit/components/nimbus/lib/PrefFlipsFeature.sys.mjs @@ -165,11 +165,11 @@ export class PrefFlipsFeature { * Return the orginal value of the pref on the specific branch if it is set by * this feature. * - * @params {string} pref - * The pref to get the original value of. + * @param {string} pref + * The pref to get the original value of. * - * @params {PrefBranch} branch - * The requested branch for the pref. + * @param {PrefBranch} branch + * The requested branch for the pref. * * @returns {PrefValue | undefined} * The original value of the pref on the specified branch. If the diff --git a/toolkit/components/nimbus/test/NimbusTestUtils.sys.mjs b/toolkit/components/nimbus/test/NimbusTestUtils.sys.mjs @@ -660,7 +660,7 @@ export const NimbusTestUtils = { * NB: These features will only be visible to the JS Nimbus client. The native * Nimbus client will have no access. * - * @params {...object} features + * @param {...object} features * A list of `_NimbusFeature`s. * * @returns {function(): void} @@ -710,12 +710,12 @@ export const NimbusTestUtils = { /** * Unenroll from all the given slugs and assert that the store is now empty. * - * @params {string[]} slugs + * @param {string[]} slugs * The slugs to unenroll from. * - * @params {object?} options + * @param {object?} options * - * @params {object?} options.manager + * @param {object?} options.manager * The ExperimentManager to clean up. Defaults to the global * ExperimentManager. * @@ -1132,7 +1132,7 @@ export const NimbusTestUtils = { * If the store contains active enrollments this function will cause the test * to fail. * - * @params {ExperimentStore} store + * @param {ExperimentStore} store * The store to delete. */ async removeStore(store) { @@ -1341,7 +1341,7 @@ export const NimbusTestUtils = { /** * Validate an enrollment matches the Nimbus enrollment schema. * - * @params {object} enrollment + * @param {object} enrollment * The enrollment to validate. * * @throws If the enrollment does not validate or its feature configurations diff --git a/toolkit/components/normandy/lib/NormandyApi.sys.mjs b/toolkit/components/normandy/lib/NormandyApi.sys.mjs @@ -146,7 +146,7 @@ export var NormandyApi = { * Fetch details for an extension from the server. * * @param extensionId {integer} The ID of the extension to look up - * @resolves {object} + * @returns {Promise<object>} */ async fetchExtensionDetails(extensionId) { const baseUrl = await this.getApiUrl("extension-list"); diff --git a/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs b/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs @@ -844,7 +844,7 @@ export var PreferenceExperiments = { * Get the experiment object for the experiment. * * @param {string} experimentSlug - * @resolves {Experiment} + * @returns {Promise<Experiment>} * @rejects {Error} * If no preference experiment exists with the given slug. */ @@ -863,7 +863,7 @@ export var PreferenceExperiments = { /** * Get a list of all stored experiment objects. * - * @resolves {Experiment[]} + * @returns {Promise<Experiment[]>} */ async getAll() { const store = await ensureStorage(); @@ -875,7 +875,7 @@ export var PreferenceExperiments = { /** * Get a list of experiment objects for all active experiments. * - * @resolves {Experiment[]} + * @returns {Promise<Experiment[]>} */ async getAllActive() { const store = await ensureStorage(); @@ -888,7 +888,8 @@ export var PreferenceExperiments = { * Check if an experiment exists with the given slug. * * @param {string} experimentSlug - * @resolves {boolean} True if the experiment exists, false if it doesn't. + * @returns {Promise<boolean>} + * Resolves to true if the experiment exists, false if it doesn't. */ async has(experimentSlug) { log.debug(`PreferenceExperiments.has(${experimentSlug})`); diff --git a/toolkit/components/normandy/lib/Storage.sys.mjs b/toolkit/components/normandy/lib/Storage.sys.mjs @@ -37,7 +37,7 @@ export var Storage = class { * Sets an item in the prefixed storage. * * @returns {Promise} - * @resolves With the stored value, or null. + * Resolves to the stored value, or null. * @rejects Javascript exception. */ async getItem(name) { @@ -49,8 +49,8 @@ export var Storage = class { /** * Sets an item in the prefixed storage. * - * @returns {Promise} - * @resolves When the operation is completed successfully + * @returns {Promise<void>} + * Resolved when the operation is completed successfully * @rejects Javascript exception. */ async setItem(name, value) { @@ -65,8 +65,8 @@ export var Storage = class { /** * Removes a single item from the prefixed storage. * - * @returns {Promise} - * @resolves When the operation is completed successfully + * @returns {Promise<void>} + * Resolved when the operation is completed successfully * @rejects Javascript exception. */ async removeItem(name) { @@ -80,8 +80,8 @@ export var Storage = class { /** * Clears all storage for the prefix. * - * @returns {Promise} - * @resolves When the operation is completed successfully + * @returns {Promise<void>} + * Resolved when the operation is completed successfully * @rejects Javascript exception. */ async clear() { diff --git a/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs b/toolkit/components/passwordmgr/LoginManagerChild.sys.mjs @@ -534,7 +534,7 @@ export class LoginFormState { * field AND whether the username is still filled in with the username AND * whether the associated password field has the matching password. * - * @note This could possibly be unified with getFieldContext but they have + * Note: This could possibly be unified with getFieldContext but they have * slightly different use cases. getFieldContext looks up recipes whereas this * method doesn't need to since it's only returning a boolean based upon the * recipes used for the last fill (in _fillForm). diff --git a/toolkit/components/passwordmgr/crypto-SDR.sys.mjs b/toolkit/components/passwordmgr/crypto-SDR.sys.mjs @@ -215,11 +215,12 @@ LoginManagerCrypto_SDR.prototype = { /** * Decrypts the specified strings, using the SecretDecoderRing. * - * @resolve {string[]} The decrypted strings. If a string cannot - * be decrypted, the empty string is returned for that instance. - * Callers will need to use decrypt() to determine if the encrypted - * string is invalid or intentionally empty. Throws/reject with - * an error if there was a problem. + * @returns {Promise<string[]>} + * Resolved to the decrypted strings. If a string cannot be decrypted, the + * empty string is returned for that instance. Callers will need to use + * decrypt() to determine if the encrypted string is invalid or intentionally + * empty. + * Throws/rejects with an error if there was a problem. */ async decryptMany(cipherTexts) { if (!Array.isArray(cipherTexts) || !cipherTexts.length) { diff --git a/toolkit/components/passwordmgr/storage-geckoview.sys.mjs b/toolkit/components/passwordmgr/storage-geckoview.sys.mjs @@ -74,7 +74,7 @@ export class LoginManagerStorage extends LoginManagerStorage_json { /** * Returns a promise resolving to an array of all saved logins that can be decrypted. * - * @resolve {nsILoginInfo[]} + * @returns {Promise<nsILoginInfo[]>} */ getAllLogins(includeDeleted) { return this._getLoginsAsync({}, includeDeleted); diff --git a/toolkit/components/passwordmgr/storage-json.sys.mjs b/toolkit/components/passwordmgr/storage-json.sys.mjs @@ -506,7 +506,7 @@ export class LoginManagerStorage_json { * fails due to a corrupt entry, the login is not included in * the resulting array. * - * @resolve {nsILoginInfo[]} + * @returns {Promise<nsILoginInfo[]>} */ async getAllLogins(includeDeleted) { this._store.ensureDataReady(); diff --git a/toolkit/components/passwordmgr/storage-rust.sys.mjs b/toolkit/components/passwordmgr/storage-rust.sys.mjs @@ -428,7 +428,7 @@ export class LoginManagerRustStorage { * fails due to a corrupt entry, the login is not included in * the resulting array. * - * @resolve {nsILoginInfo[]} + * @returns {Promise<nsILoginInfo[]>} */ async getAllLogins(includeDeleted) { // `includeDeleted` is currentlty unsupported diff --git a/toolkit/components/pictureinpicture/tests/browser_contextMenu.js b/toolkit/components/pictureinpicture/tests/browser_contextMenu.js @@ -14,8 +14,8 @@ * * @param {object} modifiers The properties to pass to synthesizeMouseAtCenter. * - * @returns Promise - * @resolves With the context menu DOM node once opened. + * @returns {Promise} + * Resolves with the context menu DOM node once opened. */ async function openContextMenu( browser, @@ -42,8 +42,7 @@ async function openContextMenu( * @param {Element} contextMenu The content area context menu opened with * openContextMenu. * - * @returns Promise - * @resolves With undefined + * @returns {Promise<void>} */ async function closeContextMenu(contextMenu) { let popupHiddenPromise = BrowserTestUtils.waitForEvent( diff --git a/toolkit/components/pictureinpicture/tests/browser_toggleAfterTabTearOutIn.js b/toolkit/components/pictureinpicture/tests/browser_toggleAfterTabTearOutIn.js @@ -8,9 +8,9 @@ * player window for a video with and without the built-in controls. * * @param {Element} tab The tab to be tested. - * @return Promise - * @resolves When the toggles for both the video-with-controls and - * video-without-controls have been tested. + * @returns {Promise<void>} + * Resolves when the toggles for both the video-with-controls and + * video-without-controls have been tested. */ async function testToggleForTab(tab) { for (let videoID of ["with-controls", "no-controls"]) { diff --git a/toolkit/components/pictureinpicture/tests/head.js b/toolkit/components/pictureinpicture/tests/head.js @@ -112,8 +112,8 @@ const DEFAULT_TOGGLE_STYLES = { * @param {boolean} triggerFn Use the given function to open the pip window, * which runs in the parent process. * - * @return Promise - * @resolves With the Picture-in-Picture window when ready. + * @returns {Promise} + * Resolves to the Picture-in-Picture window when ready. */ async function triggerPictureInPicture(browser, videoID, triggerFn) { let domWindowOpened = BrowserTestUtils.domWindowOpenedAndLoaded(null); @@ -167,8 +167,8 @@ async function triggerPictureInPicture(browser, videoID, triggerFn) { * * @param {bool} expected True if we expect the message to be showing. * - * @return Promise - * @resolves When the checks have completed. + * @returns {Promise<void>} + * Resolves when the checks have completed. */ async function assertShowingMessage(browser, videoID, expected) { let showing = await SpecialPowers.spawn(browser, [videoID], async videoID => { @@ -214,8 +214,8 @@ function assertVideoIsBeingCloned(browser, selector) { * * @param {Element} browser The <xul:browser> hosting the <video>(s) or the browsing context * - * @return Promise - * @resolves When each <video> is in the HAVE_ENOUGH_DATA readyState. + * @returns {Promise<void>} + * Resolves when each <video> is in the HAVE_ENOUGH_DATA readyState. */ async function ensureVideosReady(browser) { // PictureInPictureToggleChild waits for videos to fire their "canplay" @@ -246,8 +246,8 @@ async function ensureVideosReady(browser) { * @param {object} toggleStyles Optional argument. See the documentation for the * DEFAULT_TOGGLE_STYLES object for a sense of what styleRules is expected to be. * - * @return Promise - * @resolves When the check has completed. + * @returns {Promise<void>} + * Resolves when the check has completed. */ async function toggleOpacityReachesThreshold( browser, @@ -313,8 +313,8 @@ async function toggleOpacityReachesThreshold( * be one of the values in the TOGGLE_POLICIES from PictureInPictureControls.sys.mjs. * If undefined, this function will ensure no policy attribute is set. * - * @return Promise - * @resolves When the check has completed. + * @returns {Promise<void>} + * Resolves when the check has completed. */ async function assertTogglePolicy( browser, @@ -368,8 +368,8 @@ async function assertTogglePolicy( * mouse button events to fire. False if we expect none of them to fire. * @param {bool} isExpectingClick True if the mouse events should include the * "click" event, which is only included when the primary mouse button is pressed. - * @return Promise - * @resolves When the check has completed. + * @returns {Promise<void>} + * Resolves when the check has completed. */ async function assertSawMouseEvents( browser, @@ -407,8 +407,8 @@ async function assertSawMouseEvents( * * @param {Element} browser The <xul:browser> that will receive the mouse * events. - * @return Promise - * @resolves When the check has completed. + * @returns {Promise<void>} + * Resolves when the check has completed. */ async function assertSawClickEventOnly(browser) { let mouseEvents = await SpecialPowers.spawn(browser, [], async () => { @@ -429,14 +429,14 @@ async function assertSawClickEventOnly(browser) { * @param {Element} browser The <xul:browser> that has the <video> loaded in it. * @param {string} videoID The ID of the video that has the toggle. * - * @return Promise - * @resolves With the following Object structure: + * @returns {Promise} + * Resolves with the following Object structure: * { * controls: <Boolean>, * } * - * Where controls represents whether or not the video has the default control set - * displayed. + * Where controls represents whether or not the video has the default control + * set displayed. */ async function prepareForToggleClick(browser, videoID) { // Synthesize a mouse move just outside of the video to ensure that @@ -506,8 +506,8 @@ async function prepareForToggleClick(browser, videoID) { * @param {Element} browser The <xul:browser> that has the <video> loaded in it. * @param {string} videoID The ID of the video that has the toggle. * - * @return Promise - * @resolves With the following Object structure: + * @returns {Promise} + * Resolves with the following Object structure: * { * top: <Number>, * left: <Number>, @@ -632,9 +632,9 @@ async function hoverToggle(browser, videoID) { * before running the toggle test. The function is passed the opened * <xul:browser> as its only argument once the testURL has finished loading. * - * @return Promise - * @resolves When the test is complete and the tab with the loaded page is - * removed. + * @returns {Promise<void>} + * Resolves when the test is complete and the tab with the loaded page is + * removed. */ async function testToggle(testURL, expectations, prepFn = async () => {}) { await BrowserTestUtils.withNewTab( @@ -680,8 +680,8 @@ async function testToggle(testURL, expectations, prepFn = async () => {}) { * @param {object} toggleStyles Optional argument. See the documentation for the * DEFAULT_TOGGLE_STYLES object for a sense of what styleRules is expected to be. * - * @return Promise - * @resolves When the check for the toggle is complete. + * @returns {Promise<void>} + * Resolves when the check for the toggle is complete. */ async function testToggleHelper( browser, @@ -860,8 +860,8 @@ async function testToggleHelper( * The window that is expected to enter fullscreen mode. * @param asyncFn (Async Function) * The async function to run to trigger the fullscreen switch. - * @return Promise - * @resolves When the fullscreen entering transition completes. + * @returns {Promise<void>} + * Resolves when the fullscreen entering transition completes. */ async function promiseFullscreenEntered(window, asyncFn) { let entered = BrowserTestUtils.waitForEvent( @@ -899,8 +899,8 @@ async function promiseFullscreenEntered(window, asyncFn) { * The window that is expected to exit fullscreen mode. * @param asyncFn (Async Function) * The async function to run to trigger the fullscreen switch. - * @return Promise - * @resolves When the fullscreen exiting transition completes. + * @returns {Promise<void>} + * Resolves when the fullscreen exiting transition completes. */ async function promiseFullscreenExited(window, asyncFn) { let exited = BrowserTestUtils.waitForEvent(window, "MozDOMFullscreen:Exited"); diff --git a/toolkit/components/prompts/test/test_subresources_prompts.html b/toolkit/components/prompts/test/test_subresources_prompts.html @@ -176,8 +176,8 @@ add_task(async function runTestAuth() { * @param {string} targetID The ID of the element that will have the event * dispatched on. * @param {string} type The type of MouseEvent. - * @returns Promise - * @resolves Once the event has been dispatched. + * @returns {Promise<void>} + * Resolves once the event has been dispatched. */ async function dispatchMouseEvent(targetID, type) { /* eslint-disable no-undef */ diff --git a/toolkit/components/reader/ReaderMode.sys.mjs b/toolkit/components/reader/ReaderMode.sys.mjs @@ -210,8 +210,9 @@ export var ReaderMode = { * to parse certain URIs (e.g. about: URIs). * * @param doc A document to parse. - * @return {Promise} - * @resolves JS object representing the article, or null if no article is found. + * @returns {Promise} + * Resolves to a JS object representing the article, or null if no article is + * found. */ parseDocument(doc) { if ( @@ -230,8 +231,9 @@ export var ReaderMode = { * * @param url URL to download and parse. * @param attrs OriginAttributes to use for the request. - * @return {Promise} - * @resolves JS object representing the article, or null if no article is found. + * @returns {Promise} + * Resolves to a JS object representing the article, or null if no article is + * found. */ async downloadAndParseDocument(url, attrs = {}, docContentType = "document") { let result = await this._downloadDocument(url, attrs, docContentType); @@ -353,8 +355,9 @@ export var ReaderMode = { * in Reader.worker.js. * * @param doc The document to parse. - * @return {Promise} - * @resolves JS object representing the article, or null if no article is found. + * @returns {Promise} + * Resolves to a JS object representing the article, or null if no article is + * found. */ async _readerParse(doc) { if (this.parseNodeLimit) { @@ -460,8 +463,8 @@ export var ReaderMode = { /** * Sets a global language string value if the result is confident * - * @return Promise - * @resolves when the language is detected + * @returns {Promise<void>} + * Resolves when the language is detected */ _assignLanguage(article) { return lazy.LanguageDetector.detectLanguage(article.textContent).then( diff --git a/toolkit/components/reputationservice/test/unit/test_app_rep_windows.js b/toolkit/components/reputationservice/test/unit/test_app_rep_windows.js @@ -56,8 +56,8 @@ function readFileToString(aFilename) { * @param aOnTargetChangeFn * Optional callback invoked with the target file name when it changes. * - * @return {Promise} - * @resolves When onSaveComplete is called with a success code. + * @returns {Promise<void>} + * Resolves when onSaveComplete is called with a success code. * @rejects With an exception, if onSaveComplete is called with a failure code. */ function promiseSaverComplete(aSaver, aOnTargetChangeFn) { @@ -89,8 +89,8 @@ function promiseSaverComplete(aSaver, aOnTargetChangeFn) { * @param aCloseWhenDone * If true, the output stream will be closed when the copy finishes. * - * @return {Promise} - * @resolves When the copy completes with a success code. + * @returns {Promise<void>} + * Resolves when the copy completes with a success code. * @rejects With an exception, if the copy fails. */ function promiseCopyToSaver(aSourceString, aSaverOutputStream, aCloseWhenDone) { diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js b/toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js @@ -24,8 +24,8 @@ var gSeenPings = 0; * an "age" field. The latter representing the age in milliseconds to offset * from now. A value of 10 would make the ping 10ms older than now, for * example. - * @returns Promise - * @resolve an Array with the created pings ids. + * @returns {Promise<string[]>} + * Resolves to the created pings ids. */ var createSavedPings = async function (aPingInfos) { let pingIds = []; diff --git a/toolkit/components/telemetry/tests/unit/test_UserInteraction_annotations.js b/toolkit/components/telemetry/tests/unit/test_UserInteraction_annotations.js @@ -23,9 +23,8 @@ const TEST_ADDITIONAL_TEXT_2 = "some other additional text"; * HANG_TIME, and then returns the BHR hang report generated for * that hang. * - * @returns {Promise} - * @resolves {nsIHangDetails} - * The hang report that was created. + * @returns {Promise<nsIHangDetails>} + * Resolves to the hang report that was created. */ async function hangAndWaitForReport(expectTestAnnotation) { let hangPromise = TestUtils.topicObserved("bhr-thread-hang", subject => { diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.sys.mjs b/toolkit/components/thumbnails/BackgroundPageThumbs.sys.mjs @@ -44,31 +44,40 @@ export const BackgroundPageThumbs = { * * The page is loaded anonymously, and plug-ins are disabled. * - * @param url The URL to capture. - * @param options An optional object that configures the capture. Its - * properties are the following, and all are optional: - * @opt onDone A function that will be asynchronously called when the - * capture is complete or times out. It's called as - * onDone(url), - * where `url` is the captured URL. - * @opt timeout The capture will time out after this many milliseconds have - * elapsed after the capture has progressed to the head of - * the queue and started. Defaults to 30000 (30 seconds). - * @opt isImage If true, backgroundPageThumbsContent will attempt to render - * the url directly to canvas. Note that images will mostly get - * detected and rendered as such anyway, but this will ensure it. - * @opt targetWidth The target width when capturing an image. - * @opt backgroundColor The background colour when capturing an image. - * @opt dontStore If set to true, the image blob won't be stored to disk, an - * object will instead be passed as third argument to onDone: - * { - * data: an ArrayBuffer containing the data - * contentType: the data content-type - * originalUrl: the originally requested url - * currentUrl: the final url after redirects - * } - * @opt contentType can be set to an image contentType for the capture, - * defaults to PageThumbs.contentType. + * @param url + * The URL to capture. + * @param {object} [options] + * An optional object that configures the capture. + * @param {Function} [options.onDone] + * A function that will be asynchronously called when the capture is + * complete or times out. It's called as onDone(url), where `url` is the + * captured URL. + * @param {number} [options.timeout] + * The capture will time out after this many milliseconds have elapsed after + * the capture has progressed to the head of the queue and started. Defaults + * to 30000 (30 seconds). + * @param {boolean} [options.isImage] + * If true, backgroundPageThumbsContent will attempt to render the url + * directly to canvas. Note that images will mostly get detected and rendered + * as such anyway, but this will ensure it. + * @param {number} [options.targetWidth] + * The target width when capturing an image. + * @param {string} [options.backgroundColor] + * The background colour when capturing an image. + * @param {boolean} [options.dontStore] + * If set to true, the image blob won't be stored to disk, an object will + * instead be passed as third argument to onDone: + * ``` + * { + * data: an ArrayBuffer containing the data + * contentType: the data content-type + * originalUrl: the originally requested url + * currentUrl: the final url after redirects + * } + * ``` + * @param {string} [options.contentType] + * Can be set to an image contentType for the capture, defaults to + * PageThumbs.contentType. */ capture(url, options = {}) { if (!PageThumbs._prefEnabled()) { diff --git a/toolkit/components/thumbnails/PageThumbUtils.sys.mjs b/toolkit/components/thumbnails/PageThumbUtils.sys.mjs @@ -197,10 +197,10 @@ export var PageThumbUtils = { * It's actually better to the eye to have small blurry text than sharp * jagged pixels to represent text. * - * @params aBrowser - the browser to create a snapshot of. - * @params aDestCanvas destination canvas to draw the final + * @param aBrowser - the browser to create a snapshot of. + * @param aDestCanvas destination - canvas to draw the final * snapshot to. Can be null. - * @param aArgs (optional) Additional named parameters: + * @param [aArgs] - Additional named parameters: * fullScale - request that a non-downscaled image be returned. * @return Canvas with a scaled thumbnail of the window. */ diff --git a/toolkit/components/thumbnails/PageThumbs.sys.mjs b/toolkit/components/thumbnails/PageThumbs.sys.mjs @@ -50,9 +50,10 @@ const TaskUtils = { /** * Read the bytes from a blob, asynchronously. * - * @return {Promise} - * @resolve {ArrayBuffer} In case of success, the bytes contained in the blob. - * @reject {DOMException} In case of error, the underlying DOMException. + * @return {Promise<ArrayBuffer>} + * Resolves to the bytes contained in the blob. + * @rejects {DOMException} + * In case of error, the underlying DOMException. */ readBlob: function readBlob(blob) { return new Promise((resolve, reject) => { @@ -180,8 +181,8 @@ export var PageThumbs = { * * @param aBrowser The <browser> to capture a thumbnail from. * @param aArgs See captureToCanvas for accepted arguments. - * @return {Promise} - * @resolve {Blob} The thumbnail, as a Blob. + * @return {Promise<Blob>} + * Resolves to the thumbnail, as a Blob. */ captureToBlob: function PageThumbs_captureToBlob(aBrowser, aArgs) { if (!this._prefEnabled()) { diff --git a/toolkit/components/thumbnails/test/head.js b/toolkit/components/thumbnails/test/head.js @@ -188,11 +188,10 @@ function bgCaptureIfMissing(aURL, aOptions) { * @param {string} aURL The URL of the page to capture. * @param {object} aOptions The options object to pass to BackgroundPageThumbs. * - * @returns {Promise} - * @resolves {Array} Resolves once the capture has completed with an Array of - * results. The first element of the Array is the URL of the captured page, - * and the second element is the completion reason from the BackgroundPageThumbs - * module. + * @returns {Promise<Array>} + * Resolves once the capture has completed with an Array of results. The + * first element of the Array is the URL of the captured page, and the second + * element is the completion reason from the BackgroundPageThumbs module. */ function bgCaptureWithMethod(aMethodName, aURL, aOptions = {}) { // We'll get oranges if the expiration filter removes the file during the diff --git a/toolkit/components/utils/Sampling.sys.mjs b/toolkit/components/utils/Sampling.sys.mjs @@ -66,7 +66,9 @@ export var Sampling = { }, /** - * @promise A hash of `data`, truncated to the 12 most significant characters. + * @returns {Promise<string>} + * Resolves to a hash of `data`, truncated to the 12 most significant + * characters. */ async truncatedHash(data) { const hasher = crypto.subtle; @@ -85,7 +87,8 @@ export var Sampling = { * @param {object} input Input to hash to determine the sample. * @param {number} rate Number between 0.0 and 1.0 to sample at. A value of * 0.25 returns true 25% of the time. - * @promises {boolean} True if the input is in the sample. + * @returns {Promise<boolean>} + * Resovles to true if the input is in the sample. */ async stableSample(input, rate) { const inputHash = await Sampling.truncatedHash(input); @@ -107,8 +110,9 @@ export var Sampling = { * @param {integer} start Index of the bucket to start checking. * @param {integer} count Number of buckets to check. * @param {integer} total Total number of buckets to group inputs into. - * @promises {boolean} True if the given input is within the range of buckets - * we're checking. + * @returns {Promise<boolean>} + * Resolves to true if the given input is within the range of buckets we're + * checking. */ async bucketSample(input, start, count, total) { const inputHash = await Sampling.truncatedHash(input); @@ -142,9 +146,9 @@ export var Sampling = { * inputs. * * @param {object} input - * @param {Array<integer>} ratios - * @promises {integer} - * Index of the ratio that matched the input + * @param {Array<number>} ratios + * @returns {Promise<number>} + * Resolves to the index of the ratio that matched the input. * @rejects {Error} * If the list of ratios doesn't have at least one element */ diff --git a/toolkit/components/viewsource/test/browser/browser_viewsource_newwindow.js b/toolkit/components/viewsource/test/browser/browser_viewsource_newwindow.js @@ -3,8 +3,8 @@ * URL. * * @param {string} expectedURL The view-source: URL that's expected. - * @resolves {DOM Window} The window that was opened. * @returns {Promise} + * Resolves to the window that was opened. */ async function waitForNewViewSourceWindow(expectedURL) { let win = await BrowserTestUtils.domWindowOpened(); diff --git a/toolkit/components/workerloader/require.js b/toolkit/components/workerloader/require.js @@ -49,10 +49,9 @@ // Simple implementation of |require| let require = (function () { /** - * Mapping from module URI to module exports. + * Mapping from the absolute module URI to the exports object for that module. * - * @keys {string} The absolute URI to a module. - * @values {object} The |exports| objects for that module. + * @type {Map<string, object>} */ let modules = new Map(); diff --git a/toolkit/content/aboutLogging/profileSaveUploadLogic.mjs b/toolkit/content/aboutLogging/profileSaveUploadLogic.mjs @@ -30,7 +30,7 @@ function uploadProfileUrl() { * YYYYMMDDHHMMSS, that can be used in a file name. * * @param {Date} date - * @reurns {string} + * @returns {string} */ function getStringifiedDateAndTime(date) { const pad = val => String(val).padStart(2, "0"); diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js @@ -675,9 +675,9 @@ function initFileInfo( * An nsIURI associated with the download. The last used * directory of the picker is retrieved from/stored in the * Content Pref Service using this URI. - * @return Promise - * @resolve a boolean. When true, it indicates that the file picker dialog - * is accepted. + * @returns {Promise<boolean>} + * Resolves to a boolean. When true, it indicates that the file picker dialog is + * accepted. */ function promiseTargetFile( aFpP, diff --git a/toolkit/content/widgets/browser-custom-element.mjs b/toolkit/content/widgets/browser-custom-element.mjs @@ -1866,8 +1866,7 @@ export class MozBrowser extends MozElements.MozElementMixin(XULFrameElement) { * @param {boolean|undefined} fullViewport * True if the viewport rect should be captured. If this is true, the * x, y, w and h parameters are ignored. Defaults to false. - * @returns {Promise} - * @resolves {ImageBitmap} + * @returns {Promise<ImageBitmap>} */ async drawSnapshot(x, y, w, h, scale, backgroundColor, fullViewport = false) { let rect = fullViewport ? null : new DOMRect(x, y, w, h); diff --git a/toolkit/content/widgets/moz-button/moz-button.mjs b/toolkit/content/widgets/moz-button/moz-button.mjs @@ -199,7 +199,7 @@ class MenuController { * @property {HTMLButtonElement} buttonEl - The internal button element in the shadow DOM. * @property {HTMLButtonElement} slotEl - The internal slot element in the shadow DOM. * @cssproperty [--button-outer-padding-inline] - Used to set the outer inline padding of toolbar style buttons - * @csspropert [--button-outer-padding-block] - Used to set the outer block padding of toolbar style buttons. + * @cssproperty [--button-outer-padding-block] - Used to set the outer block padding of toolbar style buttons. * @cssproperty [--button-outer-padding-inline-start] - Used to set the outer inline-start padding of toolbar style buttons * @cssproperty [--button-outer-padding-inline-end] - Used to set the outer inline-end padding of toolbar style buttons * @cssproperty [--button-outer-padding-block-start] - Used to set the outer block-start padding of toolbar style buttons diff --git a/toolkit/modules/CanonicalJSON.sys.mjs b/toolkit/modules/CanonicalJSON.sys.mjs @@ -14,8 +14,8 @@ export var CanonicalJSON = { * The output will have all unicode chars escaped with the unicode codepoint * as lowercase hexadecimal. * - * @usage - * CanonicalJSON.stringify(listOfRecords); + * @example + * CanonicalJSON.stringify(listOfRecords); */ stringify: function stringify(source, jsescFn) { if (typeof jsescFn != "function") { diff --git a/toolkit/modules/FileUtils.sys.mjs b/toolkit/modules/FileUtils.sys.mjs @@ -41,7 +41,7 @@ export var FileUtils = { * @param modeFlags * (optional) File open flags. Can be undefined. * @returns nsIFileOutputStream to write to. - * @note The stream is initialized with the DEFER_OPEN behavior flag. + * Note: The stream is initialized with the DEFER_OPEN behavior flag. * See nsIFileOutputStream. */ openFileOutputStream: function FileUtils_openFileOutputStream( @@ -62,7 +62,7 @@ export var FileUtils = { * @param modeFlags * (optional) File open flags. Can be undefined. * @returns nsIFileOutputStream to write to. - * @note The stream is initialized with the DEFER_OPEN behavior flag. + * Note: The stream is initialized with the DEFER_OPEN behavior flag. * See nsIFileOutputStream. * OpeanAtomicFileOutputStream is generally better than openSafeFileOutputStream * baecause flushing is not needed in most of the issues. @@ -85,7 +85,7 @@ export var FileUtils = { * @param modeFlags * (optional) File open flags. Can be undefined. * @returns nsIFileOutputStream to write to. - * @note The stream is initialized with the DEFER_OPEN behavior flag. + * Note: The stream is initialized with the DEFER_OPEN behavior flag. * See nsIFileOutputStream. */ openSafeFileOutputStream: function FileUtils_openSafeFileOutputStream( diff --git a/toolkit/modules/Integration.sys.mjs b/toolkit/modules/Integration.sys.mjs @@ -188,7 +188,7 @@ IntegrationPoint.prototype = { * overridden. Its only parameter is an object that contains the base * implementation of all the available methods. * - * @note The override function is called every time the list of registered + * Note: The override function is called every time the list of registered * override functions changes. Thus, it should not have any side * effects or do any other initialization. */ diff --git a/toolkit/modules/JSONFile.sys.mjs b/toolkit/modules/JSONFile.sys.mjs @@ -200,8 +200,8 @@ JSONFile.prototype = { /** * Loads persistent data from the file to memory. * - * @return {Promise} - * @resolves When the operation finished successfully. + * @returns {Promise<void>} + * Resolves when the operation finished successfully. * @rejects JavaScript exception when dataPostProcessor fails. It never fails * if there is no dataPostProcessor. */ @@ -412,8 +412,8 @@ JSONFile.prototype = { * * If an error occurs, the previous file is not deleted. * - * @return {Promise} - * @resolves When the operation finished successfully. + * @returns {Promise<void>} + * Resolves when the operation finished successfully. * @rejects JavaScript exception. */ async _save() { @@ -483,8 +483,8 @@ JSONFile.prototype = { /** * Finishes persisting data to disk and resets all state for this file. * - * @return {Promise} - * @resolves When the object is finalized. + * @returns {Promise<void>} + * Resolves when the object is finalized. */ _finalizeInternal() { if (this._finalizePromise) { diff --git a/toolkit/modules/NewTabUtils.sys.mjs b/toolkit/modules/NewTabUtils.sys.mjs @@ -295,7 +295,7 @@ var PinnedLinks = { /** * Checks whether a given link is pinned. * - * @params aLink The link to check. + * @param aLink The link to check. * @return whether The link is pinned. */ isPinned: function PinnedLinks_isPinned(aLink) { @@ -1553,7 +1553,7 @@ var Links = { * aLink1 and aLink2 have the same ordering, or a positive number if * aLink1 is ordered after aLink2. * - * @note compareLinks's this object is bound to Links below. + * Note: compareLinks's this object is bound to Links below. */ compareLinks: function Links_compareLinks(aLink1, aLink2) { for (let prop of this._sortProperties) { diff --git a/toolkit/modules/PropertyListUtils.sys.mjs b/toolkit/modules/PropertyListUtils.sys.mjs @@ -158,7 +158,7 @@ export var PropertyListUtils = Object.freeze({ * and objects. * * @return one of the TYPE_* constants listed above. - * @note this method is merely for convenience. It has no magic to detect + * Note: this method is merely for convenience. It has no magic to detect * that aObject is indeed a property list object created by this module. */ getObjectType: function PLU_getObjectType(aObject) { @@ -384,7 +384,7 @@ BinaryPropertyListReader.prototype = { * Whether or not it is a unicode string. * @return the string read. * - * @note this is tested to work well with unicode surrogate pairs. Because + * Note: this is tested to work well with unicode surrogate pairs. Because * all unicode characters are read as 2-byte integers, unicode surrogate * pairs are read from the buffer in the form of two integers, as required * by String.fromCharCode. diff --git a/toolkit/modules/UpdateUtils.sys.mjs b/toolkit/modules/UpdateUtils.sys.mjs @@ -381,7 +381,7 @@ export var UpdateUtils = { * branch values reset when Firefox shuts down. * @return A Promise that, once the setting has been saved, resolves with the * value that was saved. - * @throw If there is an I/O error when attempting to write to the config + * @throws If there is an I/O error when attempting to write to the config * file, the returned Promise will reject with a DOMException. */ writeUpdateConfigSetting(prefName, value, options) { @@ -876,7 +876,7 @@ async function readUpdateConfig() { * @param config * The configuration object to write. * @return The configuration object written. - * @throw A DOMException will be thrown on I/O error. + * @throws A DOMException will be thrown on I/O error. */ async function writeUpdateConfig(config) { let path = UpdateUtils.getConfigFilePath(); diff --git a/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs b/toolkit/mozapps/downloads/HelperAppDlg.sys.mjs @@ -453,7 +453,7 @@ export class nsUnknownContentTypeDialog { * if set to true, this was a file entered by the user from a file picker. * @return nsIFile * the created file - * @throw an error such as permission doesn't allow creation of + * @throws an error such as permission doesn't allow creation of * file, etc. */ validateLeafName( diff --git a/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js b/toolkit/mozapps/downloads/tests/unit/test_lowMinutes.js @@ -17,8 +17,9 @@ const { DownloadUtils } = ChromeUtils.importESModule( * * @param [arg0, arg1, arg2, ...] * Any number of arguments to print out - * @usage _("Hello World") -> prints "Hello World" - * @usage _(1, 2, 3) -> prints "1 2 3" + * @example + * _("Hello World") -> prints "Hello World" + * _(1, 2, 3) -> prints "1 2 3" */ var _ = function () { print(Array.from(arguments).join(" ")); diff --git a/toolkit/mozapps/extensions/AddonManager.sys.mjs b/toolkit/mozapps/extensions/AddonManager.sys.mjs @@ -3014,9 +3014,9 @@ var AddonManagerInternal = { * * @param aIDs * The array of IDs to retrieve - * @return {Promise} - * @resolves The array of found add-ons. - * @rejects Never + * @returns {Promise} + * Resolves to the array of found add-ons. + * @rejects Never * @throws if the aIDs argument is not specified */ getAddonsByIDs(aIDs) { @@ -3089,9 +3089,9 @@ var AddonManagerInternal = { * @param aTypes * An optional array of types to retrieve. Each type is a string name * - * @resolve {addons: Array, fullData: bool} - * fullData is true if addons contains all the data we have on those - * addons. It is false if addons only contains partial data. + * @returns {Promise<{addons: Array, fullData: boolean}>} + * fullData is true if addons contains all the data we have on those addons. + * It is false if addons only contains partial data. */ async getActiveAddons(aTypes) { if (!gStarted) { @@ -5974,8 +5974,8 @@ AMTelemetry = { }, /** - * @params {object} opts - * @params {nsIURI} opts.displayURI + * @param {object} opts + * @param {nsIURI} opts.displayURI */ recordSuspiciousSiteEvent({ displayURI }) { let site = displayURI?.displayHost ?? "(unknown)"; diff --git a/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs b/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs @@ -1029,7 +1029,7 @@ var AddonDatabase = { /** * Flush any pending I/O on the addons.json file * - * @return: Promise{null} + * @returns {Promise<null>} * Resolves when the pending I/O (writing out or deleting * addons.json) completes */ diff --git a/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs b/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs @@ -1168,7 +1168,7 @@ export var AddonTestUtils = { * Creates an XPI with the given files and installs it. * * @param {object} files - * A files object as would be passed to {@see #createTempXPI}. + * A files object as would be passed to {@link createTempXPIFile()}. * @returns {Promise} * A promise which resolves when the add-on is installed. */ @@ -1546,8 +1546,8 @@ export var AddonTestUtils = { /** * @property {number} updateReason - * The default update reason for {@see promiseFindAddonUpdates} - * calls. May be overwritten by tests which primarily check for + * The default update reason for {@link promiseFindAddonUpdates()} calls. + * May be overwritten by tests which primarily check for * updates with a particular reason. */ updateReason: AddonManager.UPDATE_WHEN_PERIODIC_UPDATE, diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs @@ -344,9 +344,9 @@ export class AddonInternal { * SitePermission addons are a special case, where the triggering install site may be a subdomain * of a valid xpi origin. * - * @param {object} origins Object containing URIs related to install. - * @params {nsIURI} origins.installFrom The nsIURI of the website that has triggered the install flow. - * @params {nsIURI} origins.source The nsIURI where the xpi is hosted. + * @param {object} origins Object containing URIs related to install. + * @param {nsIURI} origins.installFrom The nsIURI of the website that has triggered the install flow. + * @param {nsIURI} origins.source The nsIURI where the xpi is hosted. * @returns {boolean} */ validInstallOrigins({ installFrom, source }) { diff --git a/toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_mlbf_dump.js b/toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_mlbf_dump.js @@ -4,7 +4,7 @@ "use strict"; /** - * @fileOverview Verifies that the MLBF dump of the addons blocklist is + * @file Verifies that the MLBF dump of the addons blocklist is * correctly registered. */ diff --git a/toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_mlbf_fetch.js b/toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_mlbf_fetch.js @@ -4,7 +4,7 @@ "use strict"; /** - * @fileOverview Tests the MLBF and RemoteSettings synchronization logic. + * @file Tests the MLBF and RemoteSettings synchronization logic. */ Services.prefs.setBoolPref("extensions.blocklist.useMLBF", true); diff --git a/toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_mlbf_update.js b/toolkit/mozapps/extensions/test/xpcshell/rs-blocklist/test_blocklist_mlbf_update.js @@ -4,7 +4,7 @@ "use strict"; /** - * @fileOverview Checks that the MLBF updating logic works reasonably. + * @file Checks that the MLBF updating logic works reasonably. */ Services.prefs.setBoolPref("extensions.blocklist.useMLBF", true);