From d7191f80e80c4c6ccbb147357e8068b3de1961ff Mon Sep 17 00:00:00 2001 From: David Vacca Date: Sat, 6 Feb 2021 23:02:02 -0800 Subject: [PATCH] Configure MC before the JS Bundle is loaded Summary: This diff setup a global variable to control the staticViewConfig experiment before the bundle is loaded. This global variable only has a meaning when RN uses a Bridge changelog: [internal] Reviewed By: JoshuaGross Differential Revision: D26237670 fbshipit-source-id: 25ae63f36fba9c1e640ab2e70de88b71452ad8e6 --- .../src/main/java/com/facebook/react/ReactInstanceManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index 55d408f6990..cb3b1dd2a9c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -1326,6 +1326,9 @@ public class ReactInstanceManager { if (Systrace.isTracing(TRACE_TAG_REACT_APPS | TRACE_TAG_REACT_JS_VM_CALLS)) { catalystInstance.setGlobalVariable("__RCTProfileIsProfiling", "true"); } + if (ReactFeatureFlags.enableExperimentalStaticViewConfigs) { + catalystInstance.setGlobalVariable("__fbStaticViewConfig", "true"); + } ReactMarker.logMarker(ReactMarkerConstants.PRE_RUN_JS_BUNDLE_START); Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "runJSBundle"); catalystInstance.runJSBundle();