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

Correctly bypass sync calls in UIManager during remote debugging #92

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Correctly bypass sync calls in UIManager during remote debugging #92

merged 1 commit into from
Jun 18, 2019

Conversation

statm
Copy link

@statm statm commented Jun 18, 2019

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Description of changes

(Mirroring facebook#25162)

Remote debugging stopped working (since 0.58, according to facebook#23254). See facebook#23254 (comment) for repro steps.

The root cause is incorrect checks for Chrome debugging environment in UIManager.js.

  • In one place where sync function lazilyLoadView should be avoided, we effectively use if (__DEV__ && !global.nativeCallSyncHook) to check remote debugging, which misses ship flavor (i.e. __DEV__ is false).
  • In another place where we want to pre-populate view managers' constants to avoid calling sync function getConstantsForViewManager, if (__DEV__) is used, also missing ship flavor.

This PR fixes both checks, only using the absense of global.nativeCallSyncHook to determine remote debugging environments.

Focus areas to test

(optional)

Microsoft Reviewers: Open in CodeFlow

@statm statm requested a review from acoates-ms as a code owner June 18, 2019 19:28
@statm statm changed the title Check nativeCallSyncHook on both dev and ship Correctly bypass sync calls in UIManager during remote debugging Jun 18, 2019
@pull-bot
Copy link

Messages
📖 📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.
📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

Generated by 🚫 dangerJS against 314d727

@statm statm merged commit 4a211cc into microsoft:master Jun 18, 2019
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.

3 participants