Skip to content

Commit ea8ae98

Browse files
msgharpuMayuresh Gharpure
andauthored
Load Required Libraries in ReactBridge's static init (#910)
* Load Required Libraries in ReactBridge's static init This change was there in RN63 and was removed in RN64 as an optimization. However, this is a probable root cause for a regression. Hence adding the patch again * Add few more libraries to be loaded in ReactBridge Co-authored-by: Mayuresh Gharpure <[email protected]>
1 parent 68f067c commit ea8ae98

File tree

1 file changed

+28
-0
lines changed
  • android-patches/patches/OfficeRNHost/ReactAndroid/src/main/java/com/facebook/react/bridge

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--- a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java
2+
+++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactBridge.java
3+
@@ -31,6 +31,25 @@ public class ReactBridge {
4+
Systrace.beginSection(
5+
TRACE_TAG_REACT_JAVA_BRIDGE, "ReactBridge.staticInit::load:reactnativejni");
6+
ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_START);
7+
+
8+
+ // JS Engine is configurable.. And we exepct only one packaged
9+
+ // Hence ignore failure
10+
+ try {
11+
+ SoLoader.loadLibrary("hermes");
12+
+ }catch (UnsatisfiedLinkError jscE){}
13+
+
14+
+ try {
15+
+ SoLoader.loadLibrary("v8jsi");
16+
+ }catch (UnsatisfiedLinkError jscE){}
17+
+
18+
+ SoLoader.loadLibrary("glog");
19+
+ SoLoader.loadLibrary("glog_init");
20+
+ SoLoader.loadLibrary("fb");
21+
+ SoLoader.loadLibrary("fbjni");
22+
+ SoLoader.loadLibrary("yoga");
23+
+ SoLoader.loadLibrary("folly_json");
24+
+ SoLoader.loadLibrary("reactperfloggerjni");
25+
+ SoLoader.loadLibrary("jsinspector");
26+
SoLoader.loadLibrary("reactnativejni");
27+
ReactMarker.logMarker(ReactMarkerConstants.LOAD_REACT_NATIVE_SO_FILE_END);
28+
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);

0 commit comments

Comments
 (0)