Skip to content

Commit

Permalink
Assert `DefaultComponentsRegistry::registerComponentDescriptorsFromEn…
Browse files Browse the repository at this point in the history
…tryPoint` is set (#42312)

Summary:
Assert `DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint` is set. For full context, see #42244.

## Changelog:

[ANDROID] [FIXED] - Assert `DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint` is set

Pull Request resolved: #42312

Test Plan: n/a

Reviewed By: javache

Differential Revision: D52835542

Pulled By: cortinico

fbshipit-source-id: be323953fc47a3a3b746c7abdd614f96d232af34
  • Loading branch information
tido64 authored and facebook-github-bot committed Jan 18, 2024
1 parent 31a162f commit 8474e23
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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);

Expand Down

0 comments on commit 8474e23

Please sign in to comment.