iOS: Fixed up remaining RCT_USE_HERMES usage --> USE_HERMES (#42148)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42148

https://github.com/facebook/react-native/pull/41625 cleaned up some usages, but there are some remaining ones.

Changelog: [iOS][Fixed] Further cleaned up RCT_USE_HERMES

Reviewed By: cipolleschi

Differential Revision: D52555309

fbshipit-source-id: e19d10de339636eca2f4762a78cebb282d0427d9
This commit is contained in:
Kevin Gozali
2024-01-05 09:11:41 -08:00
committed by Facebook GitHub Bot
parent 782e9eace9
commit d50c9068a9
2 changed files with 8 additions and 11 deletions
@@ -15,18 +15,15 @@
#import <memory>
#ifndef RCT_USE_HERMES
#if USE_HERMES
#if __has_include(<jsireact/HermesExecutorFactory.h>)
#import <jsireact/HermesExecutorFactory.h>
#define RCT_USE_HERMES 1
#elif __has_include(<reacthermes/HermesExecutorFactory.h>)
#import <reacthermes/HermesExecutorFactory.h>
#define RCT_USE_HERMES 1
#else
#endif
#else // USE_HERMES
#import <React/JSCExecutorFactory.h>
#define RCT_USE_HERMES 0
#endif
#endif
#endif // USE_HERMES
#import <ReactCommon/RCTTurboModuleManager.h>
@@ -107,11 +107,11 @@ std::unique_ptr<facebook::react::JSExecutorFactory> RCTAppSetupDefaultJsExecutor
[turboModuleManager moduleForName:"RCTDevMenu"];
#endif // end RCT_DEV
#if RCT_USE_HERMES
#if USE_HERMES
return std::make_unique<facebook::react::HermesExecutorFactory>(
#else
return std::make_unique<facebook::react::JSCExecutorFactory>(
#endif // end RCT_USE_HERMES
#endif // USE_HERMES
facebook::react::RCTJSIExecutorRuntimeInstaller(
[turboModuleManager, bridge, runtimeScheduler](facebook::jsi::Runtime &runtime) {
if (!bridge || !turboModuleManager) {
@@ -128,11 +128,11 @@ std::unique_ptr<facebook::react::JSExecutorFactory> RCTAppSetupJsExecutorFactory
RCTBridge *bridge,
const std::shared_ptr<facebook::react::RuntimeScheduler> &runtimeScheduler)
{
#if RCT_USE_HERMES
#if USE_HERMES
return std::make_unique<facebook::react::HermesExecutorFactory>(
#else
return std::make_unique<facebook::react::JSCExecutorFactory>(
#endif // end RCT_USE_HERMES
#endif // USE_HERMES
facebook::react::RCTJSIExecutorRuntimeInstaller([bridge, runtimeScheduler](facebook::jsi::Runtime &runtime) {
if (!bridge) {
return;