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

Fix problems with polyfills #2161

Merged
merged 10 commits into from
Jun 30, 2021
Merged

Conversation

piaskowyk
Copy link
Member

@piaskowyk piaskowyk commented Jun 30, 2021

Description

Babel was changing some construction to non-workletized functions inside the worklet function. For example, Object.assign() was sometimes changed to babel implementation - this implementation wasn't worklet. That was the cause of the worklet runtime error.

Fixes #2142

Known problem:
In a scenario when we have nested worklets the inner one won't be workletized with asString property of the outer one. It may cause problems in the future when sending functions between several threads will be more common. However, I don't think we have such examples in the reanimated world right now.

@Szymon20000
Copy link
Contributor

I see just one problem with our solution. In a scenario when we have nested worklets the inner one won't be workletized with asString property of the outer one. It may cause problems in the future when sending functions between several threads will be more common. However, I don't think we have such examples in the reanimated world right now. I'm fine with merging in the current state. Can you add a note in the pr description about that problem?

@piaskowyk piaskowyk merged commit 2603d4d into master Jun 30, 2021
@piaskowyk piaskowyk deleted the @szymon/fix_problems_with_polyfils branch June 30, 2021 14:11
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.

Problem with spread operator.
2 participants