[0.66] Hermes inspector is not starting when Hermes engine is used (#9426) #9477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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