Only load core modules once

Reviewed By: javache, AaaChiuuu

Differential Revision: D5303176

fbshipit-source-id: f00ecacaa695ce7a4f8b57c66cee38bb70883cae
This commit is contained in:
Kathy Gray 2017-06-22 11:34:16 -07:00 committed by Facebook Github Bot
parent 4429a8dde6
commit 2b89416ac0
1 changed files with 8 additions and 7 deletions

View File

@ -255,6 +255,14 @@ public class ReactInstanceManager {
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 @@ public class ReactInstanceManager {
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