mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Assert DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint is set (#42312)
Summary: Assert `DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint` is set. For full context, see https://github.com/facebook/react-native/issues/42244. ## Changelog: [ANDROID] [FIXED] - Assert `DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint` is set Pull Request resolved: https://github.com/facebook/react-native/pull/42312 Test Plan: n/a Reviewed By: javache Differential Revision: D52835542 Pulled By: cortinico fbshipit-source-id: be323953fc47a3a3b746c7abdd614f96d232af34
This commit is contained in:
committed by
Facebook GitHub Bot
parent
31a162f48c
commit
8474e239df
+5
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <CoreComponentsRegistry.h>
|
||||
#include <fbjni/fbjni.h>
|
||||
#include <react/debug/react_native_assert.h>
|
||||
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
||||
#include <react/renderer/components/rncore/ComponentDescriptors.h>
|
||||
|
||||
@@ -24,6 +25,10 @@ std::shared_ptr<const ComponentDescriptorProviderRegistry>
|
||||
DefaultComponentsRegistry::sharedProviderRegistry() {
|
||||
auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
|
||||
|
||||
react_native_assert(
|
||||
DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint &&
|
||||
"'registerComponentDescriptorsFromEntryPoint' was not initialized in 'JNI_OnLoad'");
|
||||
|
||||
(DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint)(
|
||||
providerRegistry);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user