Files
react-native/packages/react-native/ReactCommon
Lulu Wu a3c7102d5c Add a separate HermesInstance for internal (#37968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37968

Currently we have 2 versions of JSITracing:
- [Internal](https://www.internalfb.com/code/fbsource/[06c0641fed51160887cdaec18d22dd39d11ee1c0]/xplat/ReactNative/react/jsi/JSITracing.h)
- [OSS](https://www.internalfb.com/code/fbsource/[06c0641fed51160887cdaec18d22dd39d11ee1c0]/xplat/js/react-native-github/packages/react-native/ReactCommon/hermes/executor/JSITracing.h)

After talking with rubennorte it's expected that the OSS version has empty implementation and we want to keep it this way for Bridgeless as well.

To include both OSS and internal JSITracing for Bridgeless, in this diff a duplicate internal HermesInstance is created, after this change:
- Internal HermesInstance will use existed internal JSITracing
- OSS HermesInstance will use existed OSS JSITracing

The newly created internal HermesInstance will be located in existed internal Hermes folder which was created for the Bridge.

**Is there a better way to solve this issue?**
- I thought about including both versions of JSITracing in ReactInstance.cpp but couldn't find a way to unify the including paths for JSITracing.h inside ReactInstance.cpp

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D46527522

fbshipit-source-id: 7d2c14a6313e89bf5daaf668867cae31442e81b1
2023-06-19 20:00:03 -07:00
..