Fix initHybrid app-crashing bug

Summary: We're seeing some cases of initHybrid failing when the C++ class hasn't been registered. I don't think we should be attempting to init in these cases, so gating it by the same logic as when we load the static library.

Reviewed By: priteshrnandgaonkar

Differential Revision: D18658101

fbshipit-source-id: b29592135dcf637a8c0d40aee30e383f4f35e527
This commit is contained in:
John Knox
2019-11-22 10:50:32 -08:00
committed by Facebook Github Bot
parent a66501d7a6
commit 4faac01448

View File

@@ -21,8 +21,10 @@ class EventBase extends HybridClassBase {
}
EventBase() {
if (BuildConfig.IS_INTERNAL_BUILD) {
initHybrid();
}
}
@DoNotStrip
native void loopForever();