Skip to content

Commit 3a86864

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
[cleanup] Remove wrapper functions
Bug: none Change-Id: I1a2e2c8cb95db3571657b050555981122d18f5ea Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6330286 Auto-Submit: Nikolay Vitkov <[email protected]> Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]> Commit-Queue: Alex Rudenko <[email protected]>
1 parent 43a4a80 commit 3a86864

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

front_end/core/common/Throttler.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,11 @@ export class Throttler {
7474
if (this.#processTimeout && !forceTimerUpdate) {
7575
return;
7676
}
77-
if (this.#processTimeout) {
78-
this.#clearTimeout(this.#processTimeout);
79-
}
80-
81-
const timeout = this.#asSoonAsPossible ? 0 : this.#timeout;
82-
this.#processTimeout = this.#setTimeout(this.#onTimeout.bind(this), timeout);
83-
}
8477

85-
#clearTimeout(timeoutId: number): void {
86-
clearTimeout(timeoutId);
87-
}
78+
clearTimeout(this.#processTimeout);
8879

89-
#setTimeout(operation: () => void, timeout: number): number {
90-
return window.setTimeout(operation, timeout);
80+
const timeout = this.#asSoonAsPossible ? 0 : this.#timeout;
81+
this.#processTimeout = window.setTimeout(this.#onTimeout.bind(this), timeout);
9182
}
9283

9384
#getTime(): number {

0 commit comments

Comments
 (0)