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

[0.66] Hermes inspector is not starting when Hermes engine is used (#9426) #9477

Merged
merged 2 commits into from
Feb 5, 2022

Conversation

mganandraj
Copy link
Contributor

@mganandraj mganandraj commented Feb 4, 2022

  • Fixing hermes inspector #9407

The check to start the hermes inspector assumed that the jsiEngineOverride field to be set in the devSetting.
But, the field won't be set when using the override jsi runtime provided by the host.

The fix requires us to dynamically inspect the jsi runtime instance to find the engine type. This change adds
a field into the runtime implementation to explicitly provide the runtime type.

One alternative solution is to use RTTI which is not enabled in RNW builds.
Another alternative is to use the jsi::Runtime::description() value. We can't easily use this field as the usage of it is restricted to JS thread.

  • Change files

  • Incorporating feedbacks

  • Fixing desktop build

  • Fixing build break in Desktop integration tests

Description

Type of Change

Erase all that don't apply.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Why

What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.

Resolves [Add Relevant Issue Here]

What

What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.

Screenshots

Add any relevant screen captures here from before or after your changes.

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Optional: Describe the tests that you ran locally to verify your changes.

Microsoft Reviewers: Open in CodeFlow

…t#9426)

* Fixing hermes inspector [microsoft#9407](https://github.com/microsoft/react-native-windows/issues/)

The check to start the hermes inspector assumed that the jsiEngineOverride field to be set in the devSetting.
But, the field won't be set when using the override jsi runtime provided by the host.

The fix requires us to dynamically inspect the jsi runtime instance to find the engine type. This change adds
a field into the runtime implementation to explicitly provide the runtime type.

One alternative solution is to use RTTI which is not enabled in RNW builds.
Another alternative is to use the jsi::Runtime::description() value. We can't easily use this field as the usage of it is restricted to JS thread.

* Change files

* Incorporating feedbacks

* Fixing desktop build

* Fixing build break in Desktop integration tests
@mganandraj mganandraj marked this pull request as ready for review February 5, 2022 00:34
@mganandraj mganandraj requested a review from a team as a code owner February 5, 2022 00:34
@mganandraj mganandraj merged commit 507432b into microsoft:0.66-stable Feb 5, 2022
@mganandraj mganandraj deleted the 0.66-stable branch February 5, 2022 00:36
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