Files
react-native/ReactCommon
Ramanpreet Nara ce8440c77c Noop ModuleRegistry::registerModules() when called no modules
Summary:
In T85279528, we're trying to add a RCTURLRequestHandler to the NativeModule system, when the NativeModule system is in an invalid state. This causes a crash. Longer term, this crash will go away when we delete the legacy NativeModule system. However, in the short term:
1. The parent of this diff (i.e: D26741053) ensures that all RCTURLRequestHandlers are TurboModule-compatible. This makes the modules std::vector passed into ModuleRegistry::resigerModules empty.
2. This diff makes ModuleRegistry::registerModules() noop when the modules std::vector is empty.

In tandem, these two diffs should mitigate this crash, by making sure we don't execute the code that crashes.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D26741417

fbshipit-source-id: fc4a09f6adcbdd6dbe197c9aa6a55af077bd818b
2021-03-02 00:15:35 -08:00
..
2020-05-15 21:55:52 -07:00