add a way to enable / disable lazy native modules

Reviewed By: lexs

Differential Revision: D3849947

fbshipit-source-id: 0a4a1cd5b9f165269a53b69de46c9cc1939d9d08
This commit is contained in:
Aaron Chiu
2016-09-13 04:39:28 -07:00
committed by Facebook Github Bot 6
parent 82c8c97898
commit a4916b8c98
2 changed files with 31 additions and 21 deletions

View File

@@ -132,6 +132,7 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
private final MemoryPressureRouter mMemoryPressureRouter;
private final @Nullable NativeModuleCallExceptionHandler mNativeModuleCallExceptionHandler;
private final JSCConfig mJSCConfig;
private final boolean mLazyNativeModulesEnabled;
private final ReactInstanceDevCommandsHandler mDevInterface =
new ReactInstanceDevCommandsHandler() {
@@ -289,7 +290,8 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
UIImplementationProvider uiImplementationProvider,
NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
JSCConfig jscConfig,
@Nullable RedBoxHandler redBoxHandler) {
@Nullable RedBoxHandler redBoxHandler,
boolean lazyNativeModulesEnabled) {
initializeSoLoaderIfNecessary(applicationContext);
@@ -316,6 +318,7 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
mJSCConfig = jscConfig;
mLazyNativeModulesEnabled = lazyNativeModulesEnabled;
}
@Override