Skip to content

Commit

Permalink
Only load core modules once
Browse files Browse the repository at this point in the history
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 2b89416
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2b89416

Please sign in to comment.