Skip to content

Move shadow-node ref update thread tag to Fabric install#57497

Closed
javache wants to merge 1 commit into
react:mainfrom
javache:export-D111059967
Closed

Move shadow-node ref update thread tag to Fabric install#57497
javache wants to merge 1 commit into
react:mainfrom
javache:export-D111059967

Conversation

@javache

@javache javache commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary:
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

Summary:
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
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 9, 2026
@meta-codesync

meta-codesync Bot commented Jul 9, 2026

Copy link
Copy Markdown

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D111059967.

@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jul 9, 2026
@meta-codesync meta-codesync Bot closed this in 5976273 Jul 9, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 9, 2026
@meta-codesync

meta-codesync Bot commented Jul 9, 2026

Copy link
Copy Markdown

This pull request has been merged in 5976273.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant