|
10 | 10 | import static com.facebook.infer.annotation.ThreadConfined.UI; |
11 | 11 | import static com.facebook.react.bridge.ReactMarkerConstants.ATTACH_MEASURED_ROOT_VIEWS_END; |
12 | 12 | import static com.facebook.react.bridge.ReactMarkerConstants.ATTACH_MEASURED_ROOT_VIEWS_START; |
13 | | -import static com.facebook.react.bridge.ReactMarkerConstants.BUILD_NATIVE_MODULE_REGISTRY_END; |
14 | | -import static com.facebook.react.bridge.ReactMarkerConstants.BUILD_NATIVE_MODULE_REGISTRY_START; |
15 | 13 | import static com.facebook.react.bridge.ReactMarkerConstants.CHANGE_THREAD_PRIORITY; |
16 | 14 | import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_VIEW_MANAGERS_END; |
17 | 15 | import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_VIEW_MANAGERS_START; |
18 | 16 | import static com.facebook.react.bridge.ReactMarkerConstants.PRE_SETUP_REACT_CONTEXT_END; |
19 | 17 | import static com.facebook.react.bridge.ReactMarkerConstants.PRE_SETUP_REACT_CONTEXT_START; |
20 | | -import static com.facebook.react.bridge.ReactMarkerConstants.PROCESS_PACKAGES_END; |
21 | | -import static com.facebook.react.bridge.ReactMarkerConstants.PROCESS_PACKAGES_START; |
22 | 18 | import static com.facebook.react.bridge.ReactMarkerConstants.REACT_CONTEXT_THREAD_END; |
23 | 19 | import static com.facebook.react.bridge.ReactMarkerConstants.REACT_CONTEXT_THREAD_START; |
24 | 20 | import static com.facebook.react.bridge.ReactMarkerConstants.SETUP_REACT_CONTEXT_END; |
|
52 | 48 | import com.facebook.react.bridge.JSExceptionHandler; |
53 | 49 | import com.facebook.react.bridge.JavaScriptExecutor; |
54 | 50 | import com.facebook.react.bridge.JavaScriptExecutorFactory; |
55 | | -import com.facebook.react.bridge.NativeModuleRegistry; |
56 | 51 | import com.facebook.react.bridge.ReactApplicationContext; |
57 | 52 | import com.facebook.react.bridge.ReactContext; |
58 | 53 | import com.facebook.react.bridge.ReactMarker; |
@@ -1395,45 +1390,4 @@ private ReactApplicationContext createReactContext( |
1395 | 1390 | "ReactInstanceManager.createReactContext is unsupported. CatalystInstanceImpl has been" |
1396 | 1391 | + " removed."); |
1397 | 1392 | } |
1398 | | - |
1399 | | - private NativeModuleRegistry processPackages( |
1400 | | - ReactApplicationContext reactContext, List<ReactPackage> packages) { |
1401 | | - NativeModuleRegistryBuilder nativeModuleRegistryBuilder = |
1402 | | - new NativeModuleRegistryBuilder(reactContext); |
1403 | | - |
1404 | | - ReactMarker.logMarker(PROCESS_PACKAGES_START); |
1405 | | - |
1406 | | - synchronized (mPackages) { |
1407 | | - for (ReactPackage reactPackage : packages) { |
1408 | | - Systrace.beginSection(TRACE_TAG_REACT, "createAndProcessCustomReactPackage"); |
1409 | | - try { |
1410 | | - processPackage(reactPackage, nativeModuleRegistryBuilder); |
1411 | | - } finally { |
1412 | | - Systrace.endSection(TRACE_TAG_REACT); |
1413 | | - } |
1414 | | - } |
1415 | | - } |
1416 | | - ReactMarker.logMarker(PROCESS_PACKAGES_END); |
1417 | | - |
1418 | | - ReactMarker.logMarker(BUILD_NATIVE_MODULE_REGISTRY_START); |
1419 | | - Systrace.beginSection(TRACE_TAG_REACT, "buildNativeModuleRegistry"); |
1420 | | - NativeModuleRegistry nativeModuleRegistry; |
1421 | | - try { |
1422 | | - nativeModuleRegistry = nativeModuleRegistryBuilder.build(); |
1423 | | - } finally { |
1424 | | - Systrace.endSection(TRACE_TAG_REACT); |
1425 | | - ReactMarker.logMarker(BUILD_NATIVE_MODULE_REGISTRY_END); |
1426 | | - } |
1427 | | - |
1428 | | - return nativeModuleRegistry; |
1429 | | - } |
1430 | | - |
1431 | | - private void processPackage( |
1432 | | - ReactPackage reactPackage, NativeModuleRegistryBuilder nativeModuleRegistryBuilder) { |
1433 | | - SystraceMessage.beginSection(TRACE_TAG_REACT, "processPackage") |
1434 | | - .arg("className", reactPackage.getClass().getSimpleName()) |
1435 | | - .flush(); |
1436 | | - nativeModuleRegistryBuilder.processPackage(reactPackage); |
1437 | | - SystraceMessage.endSection(TRACE_TAG_REACT).flush(); |
1438 | | - } |
1439 | 1393 | } |
0 commit comments