mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add ComponentNameResolverManager to make UIManager.hasViewManagerConfig() work on Venice
Summary: Changelog: [Internal] Reviewed By: RSNara Differential Revision: D33860658 fbshipit-source-id: 41079b13acef531877c82dc0b2063dbe2b42edcf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6351064b75
commit
b4b5c59645
@@ -97,8 +97,6 @@ import com.facebook.react.surface.ReactStage;
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManager;
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate;
|
||||
import com.facebook.react.turbomodule.core.interfaces.TurboModuleRegistry;
|
||||
import com.facebook.react.uimanager.ComponentNameResolver;
|
||||
import com.facebook.react.uimanager.ComponentNameResolverManager;
|
||||
import com.facebook.react.uimanager.DisplayMetricsHolder;
|
||||
import com.facebook.react.uimanager.ReactRoot;
|
||||
import com.facebook.react.uimanager.UIImplementationProvider;
|
||||
@@ -168,7 +166,6 @@ public class ReactInstanceManager {
|
||||
private final DevSupportManager mDevSupportManager;
|
||||
private final boolean mUseDeveloperSupport;
|
||||
private final boolean mRequireActivity;
|
||||
private @Nullable ComponentNameResolverManager mComponentNameResolverManager;
|
||||
private final @Nullable NotThreadSafeBridgeIdleDebugListener mBridgeIdleDebugListener;
|
||||
private final Object mReactContextLock = new Object();
|
||||
private @Nullable volatile ReactContext mCurrentReactContext;
|
||||
@@ -770,7 +767,6 @@ public class ReactInstanceManager {
|
||||
synchronized (mPackages) {
|
||||
mViewManagerNames = null;
|
||||
}
|
||||
mComponentNameResolverManager = null;
|
||||
FLog.d(ReactConstants.TAG, "ReactInstanceManager has been destroyed");
|
||||
}
|
||||
|
||||
@@ -1399,23 +1395,6 @@ public class ReactInstanceManager {
|
||||
if (Systrace.isTracing(TRACE_TAG_REACT_APPS | TRACE_TAG_REACT_JS_VM_CALLS)) {
|
||||
catalystInstance.setGlobalVariable("__RCTProfileIsProfiling", "true");
|
||||
}
|
||||
if (ReactFeatureFlags.enableExperimentalStaticViewConfigs) {
|
||||
mComponentNameResolverManager =
|
||||
new ComponentNameResolverManager(
|
||||
catalystInstance.getRuntimeExecutor(),
|
||||
new ComponentNameResolver() {
|
||||
@Override
|
||||
public String[] getComponentNames() {
|
||||
List<String> viewManagerNames = getViewManagerNames();
|
||||
if (viewManagerNames == null) {
|
||||
FLog.e(TAG, "No ViewManager names found");
|
||||
return new String[0];
|
||||
}
|
||||
return viewManagerNames.toArray(new String[0]);
|
||||
}
|
||||
});
|
||||
catalystInstance.setGlobalVariable("__fbStaticViewConfig", "true");
|
||||
}
|
||||
|
||||
ReactMarker.logMarker(ReactMarkerConstants.PRE_RUN_JS_BUNDLE_START);
|
||||
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "runJSBundle");
|
||||
|
||||
Reference in New Issue
Block a user