Commit 5976273
Move shadow-node ref update thread tag to Fabric install (#57497)
Summary:
Pull Request resolved: #57497
The runtime shadow-node reference update thread tag was being set on every `RuntimeExecutor` tick in `ReactInstance`. Because the underlying flag is `thread_local` and only meaningful on the JS runtime thread, it's enough to set it once during Fabric installation.
Move the `ShadowNode::setUseRuntimeShadowNodeReferenceUpdateOnThread` call into `UIManagerBinding::createAndInstallIfNeeded`, which runs on the JS thread and is guarded to execute once per runtime. This lets the `runtime` module drop its direct dependency on `renderer/core`, reducing coupling between the Bridgeless runtime host and the Fabric renderer.
Behavior is unchanged: the write was already unconditional; the read at `updateMountedFlag` is still gated by the existing feature flag.
Changelog: [Internal]
Reviewed By: lenaic, zeyap
Differential Revision: D111059967
fbshipit-source-id: e38a16f75ba972c214cd92637caf0441ee6a734e1 parent d70113f commit 5976273
2 files changed
Lines changed: 7 additions & 2 deletions
File tree
- packages/react-native/ReactCommon/react
- renderer/uimanager
- runtime
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
101 | | - | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
| |||
0 commit comments