Skip to content

Commit bd3aca8

Browse files
committed
TabRecency: delete inactive code
this.tabIdToCounter is always empty at the time of execution, so this loop is unnecessary.
1 parent c83e0b9 commit bd3aca8

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

background_scripts/tab_recency.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ class TabRecency {
7272
this.counter = maxCounter;
7373
}
7474

75-
// Tabs loaded from storage should be considered accessed less recently than any tab tracked in
76-
// memory, so increase all of the in-memory tabs's counters by maxCounter.
77-
for (const [id, counter] of Object.entries(this.tabIdToCounter)) {
78-
const newCounter = counter + maxCounter;
79-
this.tabIdToCounter[id] = newCounter;
80-
if (this.counter < newCounter) this.counter = newCounter;
81-
}
82-
8375
this.tabIdToCounter = Object.assign({}, storage.tabRecency);
8476

8577
// Remove any tab IDs which aren't currently loaded.

0 commit comments

Comments
 (0)