mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix Soloader call in DefaultComponentsRegistry (#42660)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42660 Calling `maybeLoadSoLibrary` from init is too late, as we call `initHybrid` before `init`. Instead use a static initializer. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D53048065 fbshipit-source-id: dfd2957fd9209e02c498ee08e9cbd7c7a1a83c3e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e7fd142c38
commit
49f6ffc92f
+7
-5
@@ -23,15 +23,17 @@ class DefaultComponentsRegistry
|
||||
@DoNotStrip
|
||||
private constructor(componentFactory: ComponentFactory) {
|
||||
|
||||
@DoNotStrip private val hybridData: HybridData = initHybrid(componentFactory)
|
||||
@DoNotStrip
|
||||
@Suppress("NoHungarianNotation")
|
||||
private val mHybridData: HybridData = initHybrid(componentFactory)
|
||||
|
||||
@DoNotStrip private external fun initHybrid(componentFactory: ComponentFactory): HybridData
|
||||
|
||||
init {
|
||||
DefaultSoLoader.maybeLoadSoLibrary()
|
||||
}
|
||||
|
||||
companion object {
|
||||
init {
|
||||
DefaultSoLoader.maybeLoadSoLibrary()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@DoNotStrip
|
||||
fun register(componentFactory: ComponentFactory) = DefaultComponentsRegistry(componentFactory)
|
||||
|
||||
Reference in New Issue
Block a user