mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix Android instacrashing on JSC with NoSuchMethodException (#43907)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43907 JSC is currently instacrashing because we missed a JvmStatic. Android will attempt to load JSCInstance.initHybrid which is missing unless we specify JvmStatic. Changelog: [Internal] [Changed] - Fix Android instacrashing on JSC with NoSuchMethodException Reviewed By: GijsWeterings Differential Revision: D55795290 fbshipit-source-id: 5d10344e3f481dc5832706d77ccf2bf163dfb30f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d6c21495f7
commit
bc832ca3aa
+4
-2
@@ -9,14 +9,16 @@ package com.facebook.react.runtime
|
||||
|
||||
import com.facebook.jni.HybridData
|
||||
import com.facebook.jni.annotations.DoNotStrip
|
||||
import com.facebook.jni.annotations.DoNotStripAny
|
||||
import com.facebook.soloader.SoLoader
|
||||
|
||||
public class JSCInstance constructor() : JSRuntimeFactory(initHybrid()) {
|
||||
@DoNotStripAny
|
||||
public class JSCInstance : JSRuntimeFactory(initHybrid()) {
|
||||
private companion object {
|
||||
init {
|
||||
SoLoader.loadLibrary("jscinstance")
|
||||
}
|
||||
|
||||
@DoNotStrip protected external fun initHybrid(): HybridData
|
||||
@DoNotStrip @JvmStatic private external fun initHybrid(): HybridData
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user