mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Rename Codegen Component Descriptors Entrypoint for FAC and hook it up in DefaultComponentsRegistry (#50881)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50881 Rename Codegen Component Descriptors Entrypoint for FAC and hook it up in DefaultComponentsRegistry Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D73535745 fbshipit-source-id: dad68e7e6c8d7ba2ed86bbd1c06131101e00689e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5ec00097b6
commit
d28d4c5ff8
+10
@@ -18,6 +18,10 @@ namespace facebook::react {
|
||||
std::function<void(std::shared_ptr<const ComponentDescriptorProviderRegistry>)>
|
||||
DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint{};
|
||||
|
||||
std::function<void(std::shared_ptr<const ComponentDescriptorProviderRegistry>)>
|
||||
DefaultComponentsRegistry::
|
||||
registerCodegenComponentDescriptorsFromEntryPoint{};
|
||||
|
||||
void DefaultComponentsRegistry::setRegistryRunction(
|
||||
jni::alias_ref<jclass>,
|
||||
ComponentFactory* delegate) {
|
||||
@@ -31,6 +35,12 @@ void DefaultComponentsRegistry::setRegistryRunction(
|
||||
.flavor = nullptr};
|
||||
|
||||
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
|
||||
if (registerCodegenComponentDescriptorsFromEntryPoint) {
|
||||
registerCodegenComponentDescriptorsFromEntryPoint(providerRegistry);
|
||||
} else {
|
||||
LOG(WARNING)
|
||||
<< "Codegen component descriptors were not configured from JNI_OnLoad";
|
||||
}
|
||||
if (registerComponentDescriptorsFromEntryPoint) {
|
||||
registerComponentDescriptorsFromEntryPoint(providerRegistry);
|
||||
} else {
|
||||
|
||||
+4
@@ -27,6 +27,10 @@ class DefaultComponentsRegistry
|
||||
std::shared_ptr<const ComponentDescriptorProviderRegistry>)>
|
||||
registerComponentDescriptorsFromEntryPoint;
|
||||
|
||||
static std::function<void(
|
||||
std::shared_ptr<const ComponentDescriptorProviderRegistry>)>
|
||||
registerCodegenComponentDescriptorsFromEntryPoint;
|
||||
|
||||
private:
|
||||
static void setRegistryRunction(
|
||||
jni::alias_ref<jclass>,
|
||||
|
||||
Reference in New Issue
Block a user