File tree Expand file tree Collapse file tree 4 files changed +10
-21
lines changed
packages/react-native/ReactAndroid/src/main/java/com/facebook/react Expand file tree Collapse file tree 4 files changed +10
-21
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 ;
17- import com .facebook .react .devsupport .DefaultDevLoadingViewImplementation ;
16+ import com .facebook .react .devsupport .DevSupportManagerBase ;
1817import com .facebook .react .devsupport .interfaces .DevLoadingViewManager ;
1918import com .facebook .react .module .annotations .ReactModule ;
2019
@@ -28,14 +27,9 @@ public class DevLoadingModule extends NativeDevLoadingViewSpec {
2827 public DevLoadingModule (ReactApplicationContext reactContext ) {
2928 super (reactContext );
3029 mJSExceptionHandler = reactContext .getJSExceptionHandler ();
31- if (mJSExceptionHandler != null && mJSExceptionHandler instanceof BridgeDevSupportManager ) {
30+ if (mJSExceptionHandler != null && mJSExceptionHandler instanceof DevSupportManagerBase ) {
3231 mDevLoadingViewManager =
33- ((BridgeDevSupportManager ) mJSExceptionHandler ).getDevLoadingViewManager ();
34- mDevLoadingViewManager =
35- mDevLoadingViewManager != null
36- ? mDevLoadingViewManager
37- : new DefaultDevLoadingViewImplementation (
38- ((BridgeDevSupportManager ) mJSExceptionHandler ).getReactInstanceManagerHelper ());
32+ ((DevSupportManagerBase ) mJSExceptionHandler ).getDevLoadingViewManager ();
3933 }
4034 }
4135
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