Skip to content

fix: outlining worklet functions#36178

Open
tjzel wants to merge 2 commits intofacebook:mainfrom
tjzel:@tjzel/dont-outline-worklets
Open

fix: outlining worklet functions#36178
tjzel wants to merge 2 commits intofacebook:mainfrom
tjzel:@tjzel/dont-outline-worklets

Conversation

@tjzel
Copy link
Copy Markdown

@tjzel tjzel commented Apr 1, 2026

Summary

Fixes #32580

Inner functions of functions marked with the 'worklet' directive (worklets) can't be safely outlined as it might break the multi-threading in react-native-worklets.

I made it so recursion for outlining is skipped when the parent has 'worklet' directive.

How did you test this change?

I added a new test case and updated snapshot of previous ones - the code they emitted previously would fail at runtime.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Compiler Bug]: enableFunctionOutlining breaks react-native-reanimated API callbacks

1 participant