Skip to content

Commit

Permalink
iOS: Fixed up remaining RCT_USE_HERMES usage --> USE_HERMES (#42148)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #42148

#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
  • Loading branch information
fkgozali authored and facebook-github-bot committed Jan 5, 2024
1 parent 782e9ea commit d50c906
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
11 changes: 4 additions & 7 deletions packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
#import <React/JSCExecutorFactory.h>
#define RCT_USE_HERMES 0
#endif
#endif
#else // USE_HERMES
#import <React/JSCExecutorFactory.h>
#endif // USE_HERMES

#import <ReactCommon/RCTTurboModuleManager.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ void RCTAppSetupPrepareApp(
[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) {
Expand All @@ -128,11 +128,11 @@ void RCTAppSetupPrepareApp(
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;
Expand Down

0 comments on commit d50c906

Please sign in to comment.