Commit 52a9fed
Use atomic pointer for animationDelegate_ to prevent race during teardown
Summary:
Changelog: [internal]
[This assumption](https://fburl.com/diffusion/yeqtvxru) in `~Scheduler` might not be completely correct. There can be a race between JS thread and main thread. With main thread settings animationDelegate_ to nullptr and JS thread reading the value. Even though they always happen one after the other, JS thread can have the value of animationDelegate_ in its cache line and changing it from main thread might not invalidate it right away.
Reviewed By: JoshuaGross
Differential Revision: D29237290
fbshipit-source-id: 6cb898caf7c225cf8162e7560921b563dec514b11 parent d1e7551 commit 52a9fed
File tree
2 files changed
+9
-7
lines changed- ReactCommon/react/renderer/uimanager
2 files changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
435 | 436 | | |
436 | 437 | | |
437 | 438 | | |
438 | | - | |
439 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
443 | 445 | | |
444 | | - | |
445 | | - | |
| 446 | + | |
| 447 | + | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | 187 | | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
0 commit comments