Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back useFrameCallback cleanup #6323

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

szydlovsky
Copy link
Contributor

Summary

#6143 was supposed to improve cleanup of useFrameCallback but also deleted a needed line - setting callbackId of callback registry to -1. Seems like some code is dependent on this value and it caused some crashes such as this one: #6143. I haven't found a reliable way to reproduce the issue since we got the info from issue creator's sentry. Nonetheless, analysis of the code has shown that we need to set the callbackId to -1 on cleanup, otherwise we perform operations that shouldn't be done anymore (e.g there's this check:

).

Test plan

As stated, the issue isn't really reproducible but the change doesn't risk any regression and time will tell if it fixes the problem

@szydlovsky szydlovsky added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit d65549b Jul 24, 2024
7 checks passed
@szydlovsky szydlovsky deleted the @szydlovsky/useFrameCallback-callbackId-fix branch July 24, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants