File tree Expand file tree Collapse file tree 4 files changed +11
-16
lines changed
packages/react-native/ReactAndroid/src/main/java/com/facebook/react Expand file tree Collapse file tree 4 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,6 @@ public BridgeDevSupportManager(
8686 surfaceDelegateFactory ,
8787 devLoadingViewManager );
8888
89- mReactInstanceManagerHelper = reactInstanceManagerHelper ;
90- mDevLoadingViewManager = devLoadingViewManager ;
91-
9289 if (getDevSettings ().isStartSamplingProfilerOnInit ()) {
9390 // Only start the profiler. If its already running, there is an error
9491 if (!mIsSamplingProfilerEnabled ) {
@@ -112,14 +109,6 @@ public void onOptionSelected() {
112109 });
113110 }
114111
115- public DevLoadingViewManager getDevLoadingViewManager () {
116- return mDevLoadingViewManager ;
117- }
118-
119- public ReactInstanceDevHelper getReactInstanceManagerHelper () {
120- return mReactInstanceManagerHelper ;
121- }
122-
123112 @ Override
124113 protected String getUniqueTag () {
125114 return "Bridge" ;
Original file line number Diff line number Diff line change @@ -695,7 +695,11 @@ public DevServerHelper getDevServerHelper() {
695695 return mDevServerHelper ;
696696 }
697697
698- protected ReactInstanceDevHelper getReactInstanceDevHelper () {
698+ public DevLoadingViewManager getDevLoadingViewManager () {
699+ return mDevLoadingViewManager ;
700+ }
701+
702+ public ReactInstanceDevHelper getReactInstanceDevHelper () {
699703 return mReactInstanceDevHelper ;
700704 }
701705
Original file line number Diff line number Diff line change 1313import com .facebook .react .bridge .NativeModule ;
1414import com .facebook .react .bridge .ReactApplicationContext ;
1515import com .facebook .react .bridge .UiThreadUtil ;
16- import com .facebook .react .devsupport .BridgeDevSupportManager ;
1716import com .facebook .react .devsupport .DefaultDevLoadingViewImplementation ;
17+ import com .facebook .react .devsupport .DevSupportManagerBase ;
1818import com .facebook .react .devsupport .interfaces .DevLoadingViewManager ;
1919import com .facebook .react .module .annotations .ReactModule ;
2020
@@ -28,14 +28,14 @@ public class DevLoadingModule extends NativeDevLoadingViewSpec {
2828 public DevLoadingModule (ReactApplicationContext reactContext ) {
2929 super (reactContext );
3030 mJSExceptionHandler = reactContext .getJSExceptionHandler ();
31- if (mJSExceptionHandler != null && mJSExceptionHandler instanceof BridgeDevSupportManager ) {
31+ if (mJSExceptionHandler != null && mJSExceptionHandler instanceof DevSupportManagerBase ) {
3232 mDevLoadingViewManager =
33- ((BridgeDevSupportManager ) mJSExceptionHandler ).getDevLoadingViewManager ();
33+ ((DevSupportManagerBase ) mJSExceptionHandler ).getDevLoadingViewManager ();
3434 mDevLoadingViewManager =
3535 mDevLoadingViewManager != null
3636 ? mDevLoadingViewManager
3737 : new DefaultDevLoadingViewImplementation (
38- ((BridgeDevSupportManager ) mJSExceptionHandler ).getReactInstanceManagerHelper ());
38+ ((DevSupportManagerBase ) mJSExceptionHandler ).getReactInstanceDevHelper ());
3939 }
4040 }
4141
Original file line number Diff line number Diff line change @@ -922,6 +922,7 @@ private Task<ReactInstance> newGetOrCreateReactInstanceTask() {
922922 final JSBundleLoader bundleLoader = task .getResult ();
923923 final BridgelessReactContext reactContext = getOrCreateReactContext ();
924924 final DevSupportManager devSupportManager = getDevSupportManager ();
925+ reactContext .setJSExceptionHandler (devSupportManager );
925926
926927 log (method , "Creating ReactInstance" );
927928 final ReactInstance instance =
@@ -1036,6 +1037,7 @@ private Task<ReactInstance> oldGetOrCreateReactInstanceTask() {
10361037
10371038 final BridgelessReactContext reactContext = getOrCreateReactContext ();
10381039 final DevSupportManager devSupportManager = getDevSupportManager ();
1040+ reactContext .setJSExceptionHandler (devSupportManager );
10391041
10401042 return getJsBundleLoader ()
10411043 .onSuccess (
You can’t perform that action at this time.
0 commit comments