File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
packages/react-native/ReactAndroid
src/main/java/com/facebook/react Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,7 @@ public abstract class com/facebook/react/ReactNativeHost {
318
318
protected fun getDevSupportManagerFactory ()Lcom/facebook/react/devsupport/DevSupportManagerFactory;
319
319
protected fun getJSBundleFile ()Ljava/lang/String;
320
320
protected fun getJSEngineResolutionAlgorithm ()Lcom/facebook/react/JSEngineResolutionAlgorithm;
321
+ protected fun getJSExceptionHandler ()Lcom/facebook/react/bridge/JSExceptionHandler;
321
322
protected fun getJSMainModuleName ()Ljava/lang/String;
322
323
protected fun getJavaScriptExecutorFactory ()Lcom/facebook/react/bridge/JavaScriptExecutorFactory;
323
324
public fun getLazyViewManagersEnabled ()Z
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ public ReactInstanceManagerBuilder setInitialLifecycleState(
258
258
* DevSupportManager} will be used, which shows a redbox in dev mode and rethrows (crashes the
259
259
* app) in prod mode.
260
260
*/
261
- public ReactInstanceManagerBuilder setJSExceptionHandler (JSExceptionHandler handler ) {
261
+ public ReactInstanceManagerBuilder setJSExceptionHandler (@ Nullable JSExceptionHandler handler ) {
262
262
mJSExceptionHandler = handler ;
263
263
return this ;
264
264
}
Original file line number Diff line number Diff line change 10
10
import android .app .Application ;
11
11
import androidx .annotation .Nullable ;
12
12
import com .facebook .infer .annotation .Assertions ;
13
+ import com .facebook .react .bridge .JSExceptionHandler ;
13
14
import com .facebook .react .bridge .JavaScriptExecutorFactory ;
14
15
import com .facebook .react .bridge .ReactMarker ;
15
16
import com .facebook .react .bridge .ReactMarkerConstants ;
@@ -89,6 +90,7 @@ protected ReactInstanceManagerBuilder getBaseReactInstanceManagerBuilder() {
89
90
.setDevLoadingViewManager (getDevLoadingViewManager ())
90
91
.setRequireActivity (getShouldRequireActivity ())
91
92
.setSurfaceDelegateFactory (getSurfaceDelegateFactory ())
93
+ .setJSExceptionHandler (getJSExceptionHandler ())
92
94
.setLazyViewManagersEnabled (getLazyViewManagersEnabled ())
93
95
.setRedBoxHandler (getRedBoxHandler ())
94
96
.setJavaScriptExecutorFactory (getJavaScriptExecutorFactory ())
@@ -118,6 +120,10 @@ protected ReactInstanceManagerBuilder getBaseReactInstanceManagerBuilder() {
118
120
return null ;
119
121
}
120
122
123
+ protected @ Nullable JSExceptionHandler getJSExceptionHandler () {
124
+ return null ;
125
+ }
126
+
121
127
/** Get the {@link JavaScriptExecutorFactory}. Override this to use a custom Executor. */
122
128
protected @ Nullable JavaScriptExecutorFactory getJavaScriptExecutorFactory () {
123
129
return null ;
You can’t perform that action at this time.
0 commit comments