Re-add RCTHermesInstance constructor for compatibility (#46453)

Summary:
https://github.com/facebook/react-native/pull/46314 introduced a breaking change, making it hard to maintain backwards compatibility elsewhere. This change re-introduces the constructor that takes two arguments.

## Changelog:

[IOS] [FIXED] - Unbreak `RCTHermesInstance` constructor breaking change

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

Test Plan: n/a

Reviewed By: javache

Differential Revision: D62574496

Pulled By: cortinico

fbshipit-source-id: dcd15bf9694f4b14e37d61d7209193b3e448cd6b
This commit is contained in:
Tommy Nguyen
2024-09-12 07:05:39 -07:00
committed by Facebook GitHub Bot
parent 533ef2ca37
commit aec6666bfa
2 changed files with 10 additions and 0 deletions
@@ -22,6 +22,9 @@ using CrashManagerProvider =
class RCTHermesInstance : public JSRuntimeFactory {
public:
RCTHermesInstance();
RCTHermesInstance(
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
CrashManagerProvider crashManagerProvider);
RCTHermesInstance(
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
CrashManagerProvider crashManagerProvider,
@@ -11,6 +11,13 @@ namespace facebook::react {
RCTHermesInstance::RCTHermesInstance() : RCTHermesInstance(nullptr, nullptr, false) {}
RCTHermesInstance::RCTHermesInstance(
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
CrashManagerProvider crashManagerProvider)
: RCTHermesInstance(reactNativeConfig, std::move(crashManagerProvider), false)
{
}
RCTHermesInstance::RCTHermesInstance(
std::shared_ptr<const ReactNativeConfig> reactNativeConfig,
CrashManagerProvider crashManagerProvider,