File tree 4 files changed +10
-21
lines changed
packages/react-native/ReactAndroid/src/main/java/com/facebook/react 4 files changed +10
-21
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,6 @@ public BridgeDevSupportManager(
86
86
surfaceDelegateFactory ,
87
87
devLoadingViewManager );
88
88
89
- mReactInstanceManagerHelper = reactInstanceManagerHelper ;
90
- mDevLoadingViewManager = devLoadingViewManager ;
91
-
92
89
if (getDevSettings ().isStartSamplingProfilerOnInit ()) {
93
90
// Only start the profiler. If its already running, there is an error
94
91
if (!mIsSamplingProfilerEnabled ) {
@@ -112,14 +109,6 @@ public void onOptionSelected() {
112
109
});
113
110
}
114
111
115
- public DevLoadingViewManager getDevLoadingViewManager () {
116
- return mDevLoadingViewManager ;
117
- }
118
-
119
- public ReactInstanceDevHelper getReactInstanceManagerHelper () {
120
- return mReactInstanceManagerHelper ;
121
- }
122
-
123
112
@ Override
124
113
protected String getUniqueTag () {
125
114
return "Bridge" ;
Original file line number Diff line number Diff line change @@ -695,7 +695,11 @@ public DevServerHelper getDevServerHelper() {
695
695
return mDevServerHelper ;
696
696
}
697
697
698
- protected ReactInstanceDevHelper getReactInstanceDevHelper () {
698
+ public DevLoadingViewManager getDevLoadingViewManager () {
699
+ return mDevLoadingViewManager ;
700
+ }
701
+
702
+ public ReactInstanceDevHelper getReactInstanceDevHelper () {
699
703
return mReactInstanceDevHelper ;
700
704
}
701
705
Original file line number Diff line number Diff line change 13
13
import com .facebook .react .bridge .NativeModule ;
14
14
import com .facebook .react .bridge .ReactApplicationContext ;
15
15
import 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 ;
18
17
import com .facebook .react .devsupport .interfaces .DevLoadingViewManager ;
19
18
import com .facebook .react .module .annotations .ReactModule ;
20
19
@@ -28,14 +27,9 @@ public class DevLoadingModule extends NativeDevLoadingViewSpec {
28
27
public DevLoadingModule (ReactApplicationContext reactContext ) {
29
28
super (reactContext );
30
29
mJSExceptionHandler = reactContext .getJSExceptionHandler ();
31
- if (mJSExceptionHandler != null && mJSExceptionHandler instanceof BridgeDevSupportManager ) {
30
+ if (mJSExceptionHandler != null && mJSExceptionHandler instanceof DevSupportManagerBase ) {
32
31
mDevLoadingViewManager =
33
- ((BridgeDevSupportManager ) mJSExceptionHandler ).getDevLoadingViewManager ();
34
- mDevLoadingViewManager =
35
- mDevLoadingViewManager != null
36
- ? mDevLoadingViewManager
37
- : new DefaultDevLoadingViewImplementation (
38
- ((BridgeDevSupportManager ) mJSExceptionHandler ).getReactInstanceManagerHelper ());
32
+ ((DevSupportManagerBase ) mJSExceptionHandler ).getDevLoadingViewManager ();
39
33
}
40
34
}
41
35
Original file line number Diff line number Diff line change @@ -922,6 +922,7 @@ private Task<ReactInstance> newGetOrCreateReactInstanceTask() {
922
922
final JSBundleLoader bundleLoader = task .getResult ();
923
923
final BridgelessReactContext reactContext = getOrCreateReactContext ();
924
924
final DevSupportManager devSupportManager = getDevSupportManager ();
925
+ reactContext .setJSExceptionHandler (devSupportManager );
925
926
926
927
log (method , "Creating ReactInstance" );
927
928
final ReactInstance instance =
@@ -1036,6 +1037,7 @@ private Task<ReactInstance> oldGetOrCreateReactInstanceTask() {
1036
1037
1037
1038
final BridgelessReactContext reactContext = getOrCreateReactContext ();
1038
1039
final DevSupportManager devSupportManager = getDevSupportManager ();
1040
+ reactContext .setJSExceptionHandler (devSupportManager );
1039
1041
1040
1042
return getJsBundleLoader ()
1041
1043
.onSuccess (
You can’t perform that action at this time.
0 commit comments