Commit 32fee85
committed
fix(android): snapshot listeners before iterating to avoid ConcurrentModificationException
onChanged runs on Dispatchers.Default; addListener/removeListener run on
the JS thread. A concurrent mutation during iteration throws CME.
The ensureValueListenerJob double-create concern in the review is not real
since all calls come from the single-threaded JS side.1 parent 416374d commit 32fee85
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments