mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d02211cbce
Summary: When the TurboModule system is enabled, all TM-compatible NativeModules should not go through the legacy system. We have this filtering elsewhere in the bridge, but not for eagerly initialized NativeModules with custom initializers (i.e: modules returned from extraModulesForBridge). This diff adds that filtering for modules returned from extraModulesForBridge. NOTE: NativeModule initializers can still perform side-effects. So, it's still best to not create the TM-compatible NativeModule inside extraModulesForBridge. This diff just adds an additional layer of defense within the bridge. Changelog: [Internal] Differential Revision: D26264531 fbshipit-source-id: 26179d9094f67d6d6315a65cdb2dc614e5397bf3