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
This commit is contained in:
David Vacca
2021-02-06 23:02:02 -08:00
committed by Facebook GitHub Bot
parent 33c390a7da
commit d7191f80e8
@@ -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();