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[react-devtools]: initialize bridge only after domain is ready #110

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

hoxyq
Copy link

@hoxyq hoxyq commented Sep 5, 2024

Summary

Bridge and Store should only be created after the domain initialization. This is because Bridge is attempting to send some messages to the other end right after it has been created. They should not be created in model's constructor, because at this point there is no guarantee that the binding (which is used for messaging) has already been installed.

Test plan

Tested manually.

Before:
before

After:
after

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

@hoxyq hoxyq requested a review from huntie September 5, 2024 20:00
@hoxyq hoxyq mentioned this pull request Sep 5, 2024
2 tasks
Copy link

@huntie huntie left a comment

Choose a reason for hiding this comment

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

Thanks!

@huntie huntie merged commit aea0153 into main Sep 9, 2024
3 checks passed
@huntie huntie deleted the react-devtools/fix-sending-message-race branch September 9, 2024 10:50
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.

3 participants