Permalink
Browse files

Only load core modules once

Reviewed By: javache, AaaChiuuu

Differential Revision: D5303176

fbshipit-source-id: f00ecacaa695ce7a4f8b57c66cee38bb70883cae
  • Loading branch information...
Kathy Gray authored and facebook-github-bot committed Jun 22, 2017
1 parent 4429a8d commit 2b89416ac0bf1a420af56543310b41d39ce4fe6c
Showing with 8 additions and 7 deletions.
  1. +8 −7 ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java
@@ -255,6 +255,14 @@ public static ReactInstanceManagerBuilder builder() {
mUseSeparateUIBackgroundThread = useSeparateUIBackgroundThread;
mMinNumShakes = minNumShakes;
CoreModulesPackage coreModulesPackage =
new CoreModulesPackage(
this,
mBackBtnHandler,
mUIImplementationProvider,
mLazyViewManagersEnabled);
mPackages.add(0, coreModulesPackage);
// Instantiate ReactChoreographer in UI thread.
ReactChoreographer.initialize();
}
@@ -954,13 +962,6 @@ private ReactApplicationContext createReactContext(
reactContext.setNativeModuleCallExceptionHandler(mDevSupportManager);
}
CoreModulesPackage coreModulesPackage =
new CoreModulesPackage(
this,
mBackBtnHandler,
mUIImplementationProvider,
mLazyViewManagersEnabled);
mPackages.add(0,coreModulesPackage);
NativeModuleRegistry nativeModuleRegistry = processPackages(reactContext, mPackages, false);
NativeModuleCallExceptionHandler exceptionHandler = mNativeModuleCallExceptionHandler != null

0 comments on commit 2b89416

Please sign in to comment.