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

Avoid double serialization of __initData #5186

Merged
merged 2 commits into from
Nov 13, 2023
Merged

Conversation

tomekzaw
Copy link
Member

@tomekzaw tomekzaw commented Oct 5, 2023

Summary

When serializing worklets, first we call makeShareableCloneRecursive for value.__initData (see #3930) and then we process the rest of the props. Currently, we don't skip __initData in the second phase which leads to double conversion of this field and contradicts the whole idea. The regression was introduced by me in #4944 which removed delete value.__initData; in order to allow worklets to be copied to multiple runtimes and not only one. This PR skips serializing __initData if it has already been serialized.

Test plan

@tomekzaw tomekzaw marked this pull request as ready for review October 25, 2023 22:01
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@tomekzaw tomekzaw added this pull request to the merge queue Nov 13, 2023
Merged via the queue into main with commit b7fccb9 Nov 13, 2023
7 checks passed
@tomekzaw tomekzaw deleted the @tomekzaw/shareables-init-data branch November 13, 2023 12:48
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