mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Don't call ReactBridge.staticInit() on the main thread
Summary: Adding a hook to check if ReactBridge is initialized so we can avoid loading the .so on the main thread. Reviewed By: fkgozali Differential Revision: D17747958 fbshipit-source-id: 5969afa57dc1b446c03bc68eaa9e1385fe17c461
This commit is contained in:
committed by
Facebook Github Bot
parent
a45e6a8b5f
commit
7d8b7ff3aa
@@ -18,6 +18,10 @@ public class ReactBridge {
|
||||
|
||||
private static boolean sDidInit = false;
|
||||
|
||||
public static boolean isInitialized() {
|
||||
return sDidInit;
|
||||
}
|
||||
|
||||
public static synchronized void staticInit() {
|
||||
if (sDidInit) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user