Skip to content

Fix setImmediate/clearTimeout mismatch in NativeAnimatedHelper#46525

Closed
bgirard wants to merge 1 commit into
facebook:mainfrom
bgirard:export-D62775703
Closed

Fix setImmediate/clearTimeout mismatch in NativeAnimatedHelper#46525
bgirard wants to merge 1 commit into
facebook:mainfrom
bgirard:export-D62775703

Conversation

@bgirard
Copy link
Copy Markdown

@bgirard bgirard commented Sep 16, 2024

Summary:
While debugging I noticed that my setTimout was being cleared by someone else. Upon further inspection I found NativeAnimatedHelper which was mismatching setImmediate timer handle with a clearTimeout. This isn't safe and needs to be fixed.

I used this to rename the timer to be more clear to reduce the changes of mismatches.

Changelog: Fix setImmediate/clearTimeout mismatch in NativeAnimatedHelper that could clear an unrelated setTimeout.

Differential Revision: D62775703

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Sep 16, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D62775703

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D62775703

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D62775703

…ook#46525)

Summary:
Pull Request resolved: facebook#46525

While debugging I noticed that my setTimout was being cleared by someone else. Upon further inspection I found NativeAnimatedHelper which was mismatching setImmediate timer handle with a clearTimeout. This isn't safe and needs to be fixed.

I used this to rename the timer to be more clear to reduce the changes of mismatches.

Changelog:
[General][Fixed] - Fix setImmediate/clearTimeout mismatch in NativeAnimatedHelper that could clear an unrelated setTimeout.

Reviewed By: javache, yungsters

Differential Revision: D62775703
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D62775703

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 18, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in a5dd1be.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by Benoit Girard in a5dd1be

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. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants