Skip to content

Commit

Permalink
Add getter for JS Executor Factory
Browse files Browse the repository at this point in the history
Reviewed By: mhorowitz

Differential Revision: D5857012

fbshipit-source-id: 8c9fc0095c512325968234f48d6728b63d61913d
  • Loading branch information
johnislarry authored and facebook-github-bot committed Sep 19, 2017
1 parent 0ee502d commit e764361
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import android.app.Application;

import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.JavaScriptExecutorFactory;
import com.facebook.react.common.LifecycleState;
import com.facebook.react.devsupport.RedBoxHandler;
import com.facebook.react.uimanager.UIImplementationProvider;
Expand Down Expand Up @@ -68,6 +69,7 @@ protected ReactInstanceManager createReactInstanceManager() {
.setJSMainModulePath(getJSMainModuleName())
.setUseDeveloperSupport(getUseDeveloperSupport())
.setRedBoxHandler(getRedBoxHandler())
.setJavaScriptExecutorFactory(getJavaScriptExecutorFactory())
.setUIImplementationProvider(getUIImplementationProvider())
.setInitialLifecycleState(LifecycleState.BEFORE_CREATE);

Expand All @@ -91,6 +93,14 @@ protected ReactInstanceManager createReactInstanceManager() {
return null;
}

/**
* Get the {@link JavaScriptExecutorFactory}. Override this to use a custom
* Executor.
*/
protected @Nullable JavaScriptExecutorFactory getJavaScriptExecutorFactory() {
return null;
}

protected final Application getApplication() {
return mApplication;
}
Expand Down

0 comments on commit e764361

Please sign in to comment.