Skip to content

Commit

Permalink
comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Casheeew committed Dec 29, 2023
1 parent 8dc5409 commit f076d89
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 5 additions & 3 deletions ext/js/app/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -552,9 +552,11 @@ export class Frontend {
}
}

// The token below is used as a unique identifier to ensure that a new _updatePopup call
// hasn't been started during the await.
/** @type {?import('core').TokenObject} */
/**
* The token below is used as a unique identifier to ensure that a new _updatePopup call
* hasn't been started during the await.
* @type {?import('core').TokenObject}
*/
const token = {};
this._updatePopupToken = token;
const popup = await popupPromise;
Expand Down
2 changes: 1 addition & 1 deletion ext/js/background/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -1664,14 +1664,14 @@ export class Backend {
}

/**
* This function works around the need to have the "tabs" permission to access tab.url.
* @param {number} timeout
* @param {boolean} multiple
* @param {import('backend').FindTabsPredicate} predicate
* @param {boolean} predicateIsAsync
* @returns {Promise<import('backend').TabInfo[]|(?import('backend').TabInfo)>}
*/
async _findTabs(timeout, multiple, predicate, predicateIsAsync) {
// This function works around the need to have the "tabs" permission to access tab.url.
const tabs = await this._getAllTabs();

let done = false;
Expand Down
10 changes: 6 additions & 4 deletions ext/js/comm/clipboard-monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ export class ClipboardMonitor extends EventDispatcher {
start() {
this.stop();

// The token below is used as a unique identifier to ensure that a new clipboard monitor
// hasn't been started during the await call. The check below the await call
// will exit early if the reference has changed.
let canChange = false;
/** @type {?import('core').TokenObject} */
/**
* This token is used as a unique identifier to ensure that a new clipboard monitor
* hasn't been started during the await call. The check below the await call
* will exit early if the reference has changed.
* @type {?import('core').TokenObject}
*/
const token = {};
const intervalCallback = async () => {
this._timerId = null;
Expand Down

0 comments on commit f076d89

Please sign in to comment.