From bc7c757e9de9592d175b1a712e4dda2684b8ba3f Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Wed, 10 Jun 2026 09:17:52 -0700 Subject: [PATCH] Remove dead RAMBundleRegistry::multipleBundlesRegistry static factory Summary: X-link: https://github.com/facebook/react-native/pull/57137 `RAMBundleRegistry::multipleBundlesRegistry` was a static factory wrapping the public `RAMBundleRegistry` constructor (the one taking a main bundle plus a factory callback), but it had no callers anywhere. Registries are constructed via the public constructor directly. With the sibling `singleBundleRegistry` already removed, this deletes the last orphaned static factory; the constructor and the rest of the class remain intact. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D108012906 fbshipit-source-id: 7bb403ff7660317f0f5b422dca140ac69e048dac --- .../ReactCommon/cxxreact/RAMBundleRegistry.cpp | 7 ------- .../react-native/ReactCommon/cxxreact/RAMBundleRegistry.h | 4 ---- scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api | 1 - scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api | 1 - scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api | 1 - scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api | 1 - scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api | 1 - scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api | 1 - 8 files changed, 17 deletions(-) diff --git a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp index b105676cc9f..378ccf2f1ce 100644 --- a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp +++ b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.cpp @@ -20,13 +20,6 @@ namespace facebook::react { constexpr uint32_t RAMBundleRegistry::MAIN_BUNDLE_ID; #pragma clang diagnostic pop -std::unique_ptr RAMBundleRegistry::multipleBundlesRegistry( - std::unique_ptr mainBundle, - std::function(std::string)> factory) { - return std::make_unique( - std::move(mainBundle), std::move(factory)); -} - RAMBundleRegistry::RAMBundleRegistry( std::unique_ptr mainBundle, std::function(std::string)> factory) diff --git a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h index 434855471b8..16ce66943ed 100644 --- a/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h +++ b/packages/react-native/ReactCommon/cxxreact/RAMBundleRegistry.h @@ -27,10 +27,6 @@ class RN_EXPORT [[deprecated("This API will be removed along with the legacy arc public: constexpr static uint32_t MAIN_BUNDLE_ID = 0; - static std::unique_ptr multipleBundlesRegistry( - std::unique_ptr mainBundle, - std::function(std::string)> factory); - explicit RAMBundleRegistry( std::unique_ptr mainBundle, std::function(std::string)> factory = nullptr); diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api index f9d2a6f64fc..c397fe34d92 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api @@ -4179,7 +4179,6 @@ class facebook::react::RAMBundleRegistry { public facebook::react::JSModulesUnbundle::Module getModule(uint32_t bundleId, uint32_t moduleId); public facebook::react::RAMBundleRegistry& operator=(facebook::react::RAMBundleRegistry&&) = default; public static constexpr uint32_t MAIN_BUNDLE_ID; - public static std::unique_ptr multipleBundlesRegistry(std::unique_ptr mainBundle, std::function(std::string)> factory); public virtual ~RAMBundleRegistry() = default; public void registerBundle(uint32_t bundleId, std::string bundlePath); } diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api index 4b1ac065e6d..67218a64c80 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api @@ -4176,7 +4176,6 @@ class facebook::react::RAMBundleRegistry { public facebook::react::JSModulesUnbundle::Module getModule(uint32_t bundleId, uint32_t moduleId); public facebook::react::RAMBundleRegistry& operator=(facebook::react::RAMBundleRegistry&&) = default; public static constexpr uint32_t MAIN_BUNDLE_ID; - public static std::unique_ptr multipleBundlesRegistry(std::unique_ptr mainBundle, std::function(std::string)> factory); public virtual ~RAMBundleRegistry() = default; public void registerBundle(uint32_t bundleId, std::string bundlePath); } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 24723a5aec5..513770ccd3b 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -6360,7 +6360,6 @@ class facebook::react::RAMBundleRegistry { public facebook::react::JSModulesUnbundle::Module getModule(uint32_t bundleId, uint32_t moduleId); public facebook::react::RAMBundleRegistry& operator=(facebook::react::RAMBundleRegistry&&) = default; public static constexpr uint32_t MAIN_BUNDLE_ID; - public static std::unique_ptr multipleBundlesRegistry(std::unique_ptr mainBundle, std::function(std::string)> factory); public virtual ~RAMBundleRegistry() = default; public void registerBundle(uint32_t bundleId, std::string bundlePath); } diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index 070f0dc5cba..91c526cadd8 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -6357,7 +6357,6 @@ class facebook::react::RAMBundleRegistry { public facebook::react::JSModulesUnbundle::Module getModule(uint32_t bundleId, uint32_t moduleId); public facebook::react::RAMBundleRegistry& operator=(facebook::react::RAMBundleRegistry&&) = default; public static constexpr uint32_t MAIN_BUNDLE_ID; - public static std::unique_ptr multipleBundlesRegistry(std::unique_ptr mainBundle, std::function(std::string)> factory); public virtual ~RAMBundleRegistry() = default; public void registerBundle(uint32_t bundleId, std::string bundlePath); } diff --git a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api index 986d093eb55..27455fe089b 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api @@ -2760,7 +2760,6 @@ class facebook::react::RAMBundleRegistry { public facebook::react::JSModulesUnbundle::Module getModule(uint32_t bundleId, uint32_t moduleId); public facebook::react::RAMBundleRegistry& operator=(facebook::react::RAMBundleRegistry&&) = default; public static constexpr uint32_t MAIN_BUNDLE_ID; - public static std::unique_ptr multipleBundlesRegistry(std::unique_ptr mainBundle, std::function(std::string)> factory); public virtual ~RAMBundleRegistry() = default; public void registerBundle(uint32_t bundleId, std::string bundlePath); } diff --git a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api index cddea843733..386592ab412 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api @@ -2757,7 +2757,6 @@ class facebook::react::RAMBundleRegistry { public facebook::react::JSModulesUnbundle::Module getModule(uint32_t bundleId, uint32_t moduleId); public facebook::react::RAMBundleRegistry& operator=(facebook::react::RAMBundleRegistry&&) = default; public static constexpr uint32_t MAIN_BUNDLE_ID; - public static std::unique_ptr multipleBundlesRegistry(std::unique_ptr mainBundle, std::function(std::string)> factory); public virtual ~RAMBundleRegistry() = default; public void registerBundle(uint32_t bundleId, std::string bundlePath); }