Commit 670d769
Inline onTransitionAnimationEnd and fix iterator invalidation in ViewTransitionModule (#56104)
Summary:
Pull Request resolved: #56104
`startViewTransitionEnd` was removing entries from `nameRegistry_` while iterating over it via `onTransitionAnimationEnd`, which is undefined behavior.
This diff improves the fix by:
- Inlining `onTransitionAnimationEnd` (private, single call site)
- Clearing `nameRegistry_` after the loop instead of erasing during iteration, removing the need for a copy
## Changelog:
[Internal] [Fixed] - Inline onTransitionAnimationEnd and fix iterator invalidation in ViewTransitionModule
Reviewed By: christophpurrer
Differential Revision: D96085815
fbshipit-source-id: b8e425d1166421cd10b27ea5d366d9fdef58d4681 parent 44ac8c2 commit 670d769
2 files changed
Lines changed: 6 additions & 21 deletions
File tree
- packages/react-native/ReactCommon/react/renderer/viewtransition
Lines changed: 6 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 177 | | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
| |||
0 commit comments