Skip to content

clear up props registry in shared backend on js thread (#56677)#56677

Closed
zeyap wants to merge 1 commit into
react:mainfrom
zeyap:export-D103752709
Closed

clear up props registry in shared backend on js thread (#56677)#56677
zeyap wants to merge 1 commit into
react:mainfrom
zeyap:export-D103752709

Conversation

@zeyap

@zeyap zeyap commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary:

Changelog:

[Internal] [Fixed] - clear up props registry in shared backend on js thread

stopSurface is usually called from main thread, but animatedPropsRegistry_->getMap in animationBackendCommitHook is called from js thread. Removing the surface props entry on ui thread can cause race condition (getMap() result on js thread becomes undefined)

https://www.internalfb.com/code/fbsource/[26d70084020e]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.cpp?lines=26-31

Reviewed By: christophpurrer

Differential Revision: D103752709

@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 May 4, 2026
@meta-codesync

meta-codesync Bot commented May 4, 2026

Copy link
Copy Markdown

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

@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels May 4, 2026
@meta-codesync meta-codesync Bot changed the title wait for ShadowTree finish commits & unregister before clearing up props registry in shared backend clear up props registry in shared backend on js thread (#56677) May 4, 2026
@zeyap zeyap force-pushed the export-D103752709 branch 9 times, most recently from 141377d to 38efda2 Compare May 5, 2026 13:39
Summary:

## Changelog:

[Internal] [Fixed] - clear up props registry in shared backend on js thread

stopSurface is usually called from main thread, but `animatedPropsRegistry_->getMap` in animationBackendCommitHook is called from js thread. Removing the surface props entry on ui thread can cause race condition (getMap() result on js thread becomes undefined) 

https://www.internalfb.com/code/fbsource/[26d70084020e]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.cpp?lines=26-31

Reviewed By: christophpurrer

Differential Revision: D103752709
@zeyap zeyap force-pushed the export-D103752709 branch from 38efda2 to 6d0f530 Compare May 5, 2026 18:22
@meta-codesync meta-codesync Bot closed this in 0d20210 May 5, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label May 5, 2026
@meta-codesync

meta-codesync Bot commented May 5, 2026

Copy link
Copy Markdown

This pull request has been merged in 0d20210.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @zeyap in 0d20210

When will my fix make it into a release? | How to file a pick request?

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. fb-exported 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.

2 participants