@@ -137,7 +137,6 @@ public interface ReactInstanceEventListener {
137
137
private final @ Nullable JSBundleLoader mBundleLoader ;
138
138
private final @ Nullable String mJSMainModulePath ; /* path to JS bundle root on packager server */
139
139
private final List <ReactPackage > mPackages ;
140
- private final List <CatalystInstanceImpl .PendingJSCall > mInitFunctions ;
141
140
private final DevSupportManager mDevSupportManager ;
142
141
private final boolean mUseDeveloperSupport ;
143
142
private final @ Nullable NotThreadSafeBridgeIdleDebugListener mBridgeIdleDebugListener ;
@@ -217,7 +216,6 @@ public static ReactInstanceManagerBuilder builder() {
217
216
mBundleLoader = bundleLoader ;
218
217
mJSMainModulePath = jsMainModulePath ;
219
218
mPackages = new ArrayList <>();
220
- mInitFunctions = new ArrayList <>();
221
219
mUseDeveloperSupport = useDeveloperSupport ;
222
220
mDevSupportManager =
223
221
DevSupportManagerFactory .create (
@@ -356,28 +354,6 @@ public void registerAdditionalPackages(List<ReactPackage> packages) {
356
354
catalystInstance .extendNativeModules (nativeModuleRegistry );
357
355
}
358
356
359
- /**
360
- * If the JavaScript bundle for this app requires initialization as part of bridge start up,
361
- * register a function using its @param module and @param method and optional arguments.
362
- */
363
- public void registerInitFunction (String module , String method , @ Nullable NativeArray arguments ) {
364
- CatalystInstanceImpl .PendingJSCall init =
365
- new CatalystInstanceImpl .PendingJSCall (module , method , arguments );
366
- synchronized (this ) {
367
- mInitFunctions .add (init );
368
- }
369
- ReactContext context = getCurrentReactContext ();
370
- CatalystInstance catalystInstance = context == null ? null : context .getCatalystInstance ();
371
- if (catalystInstance == null ) {
372
- return ;
373
- } else {
374
- // CatalystInstance is only visible after running jsBundle, so these will be put on the native
375
- // JS queue
376
- // TODO T20546472 remove cast when catalystInstance and InstanceImpl are renamed/merged
377
- ((CatalystInstanceImpl ) catalystInstance ).callFunction (init );
378
- }
379
- }
380
-
381
357
/**
382
358
* Recreate the react application and context. This should be called if configuration has changed
383
359
* or the developer has requested the app to be reloaded. It should only be called after an
@@ -1135,13 +1111,6 @@ private ReactApplicationContext createReactContext(
1135
1111
}
1136
1112
ReactMarker .logMarker (ReactMarkerConstants .PRE_RUN_JS_BUNDLE_START );
1137
1113
catalystInstance .runJSBundle ();
1138
- // Transitions functions in the minitFunctions list to catalystInstance, to run after the bundle
1139
- // TODO T20546472
1140
- if (!mInitFunctions .isEmpty ()) {
1141
- for (CatalystInstanceImpl .PendingJSCall function : mInitFunctions ) {
1142
- ((CatalystInstanceImpl ) catalystInstance ).callFunction (function );
1143
- }
1144
- }
1145
1114
reactContext .initializeWithInstance (catalystInstance );
1146
1115
1147
1116
return reactContext ;
0 commit comments