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

Alternative fix for #3236 that avoids causing #3503 #3505

Merged
merged 3 commits into from
Jan 15, 2021

Conversation

RedBeard0531
Copy link
Contributor

What, How & Why?

The problem with the fix in #3340 was that it was causing the
EventLoopDispatcher to be constructed on the sync thread rather than on the JS
thread, which is required. This alternative fix initializes it on the JS
thread, but ensures it is re-initialized when RN apps are reloaded.

This closes #3503.

@reviewers: first commit is a revert of #3340, second commit is the alternate fix. I suggest reviewing each commit separately rather than combined.

☑️ ToDos

  • 📝 Changelog entry
  • [ ] 📝 Compatibility label is updated or copied from previous entry
  • [ ] 🚦 Tests
  • [ ] 📝 Public documentation PR created or is not necessary
  • [ ] 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • [ ] typescript definitions file is updated
  • [ ] jsdoc files updated
  • [ ] Chrome debug API is updated if API is available on React Native

The problem with the fix in #3340 was that it was causing the
EventLoopDispatcher to be constructed on the sync thread rather than on the JS
thread, which is required. This alternative fix initializes it on the JS
thread, but ensures it is re-initialized when RN apps are reloaded.
Copy link
Contributor

@steffenagger steffenagger left a comment

Choose a reason for hiding this comment

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

I've tested these changes in relation to an older issue, where devs were blocked from doing additional logins, when refreshing an app running in a simulator.

@kneth kneth merged commit d10f75b into master Jan 15, 2021
@kneth kneth deleted the ms/fix_transport_threading branch January 15, 2021 20:49
RedBeard0531 added a commit that referenced this pull request Jan 25, 2021
This means that it will be destroyed when the JSNetworkTransport object is
destroyed, rather than living forever in a static member.

Fixes #3525.
Refines change in #3505.
RedBeard0531 added a commit that referenced this pull request Jan 27, 2021
This means that it will be destroyed when the JSNetworkTransport object is
destroyed, rather than living forever in a static member.

Fixes #3525.
Refines change in #3505.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash after 401 error
4 participants