Commit f42ac29
committed
Fixes avatar "never expire" timestamp being smaller than Date.now()
The V8 smi optimization (2^30) was applied to the avatar cache timestamp
in 2975af4, replacing Number.MAX_SAFE_INTEGER. Unlike the annotation
providers where the value is compared against line/column numbers, here
it is compared against Date.now() (~1.75 trillion ms), so the "never
expire" sentinel (~1.07 billion) always appears expired. This caused
repeated async re-lookups for repos with remotes but no integration.
Uses Infinity as the sentinel — makes hasAvatarExpired return false
without any arithmetic, and communicates the "never expire" intent
directly.
(#5155)1 parent 7c9894c commit f42ac29
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
270 | 268 | | |
271 | 269 | | |
272 | 270 | | |
273 | | - | |
| 271 | + | |
274 | 272 | | |
275 | 273 | | |
276 | 274 | | |
| |||
0 commit comments