Repository navigation
Commit b4544bb
Stop RCTIdentifierPool::dequeue from spinning forever when the pool is full
dequeue() scanned for a free identifier in an unbounded loop. Once every
identifier was taken, which happens when the touch handlers leak them over
a long-lived process, the loop never exited and hung the main thread.
Bound the scan to one pass over the pool. If no identifier is free, reclaim
them all and reuse one. Also initialise lastIndex, which was read before
being assigned.
Fixes #58441
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent be5235d commit b4544bb
1 file changed
Lines changed: 9 additions & 2 deletions
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
| |||
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
42 | | - | |
| 49 | + | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
0 commit comments