mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-07 17:37:34 +08:00
Only load core modules once
Reviewed By: javache, AaaChiuuu Differential Revision: D5303176 fbshipit-source-id: f00ecacaa695ce7a4f8b57c66cee38bb70883cae
This commit is contained in:
committed by
Facebook Github Bot
parent
4429a8dde6
commit
2b89416ac0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user