mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 03:26:07 +00:00
Invoking devMenu from RCTBridge in prod will crash
Summary: While we shouldn't invoke `bridge.devMenu` in production, doing it will result into a crash. 1. `devMenu` internally calls `RCTBridgeModuleNameForClass([RCTDevMenu class])` 2. `RCTBridgeModuleNameForClass()` calls `moduleName` 3. In the release code `RCTDevMenu` doesn't export the `moduleName` class method. Closes https://github.com/facebook/react-native/pull/2910 Reviewed By: svcscm Differential Revision: D2550797 Pulled By: tadeuzagallo fb-gh-sync-id: 5dfbf905e5a02d9fd3b52f8b3d6eefc4e3ff30b2
This commit is contained in:
parent
256f69f4e6
commit
1511d8ca1d
@ -623,7 +623,11 @@ RCT_EXPORT_METHOD(reload)
|
||||
|
||||
- (RCTDevMenu *)devMenu
|
||||
{
|
||||
#if RCT_DEV
|
||||
return self.modules[RCTBridgeModuleNameForClass([RCTDevMenu class])];
|
||||
#else
|
||||
return nil;
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
x
Reference in New Issue
Block a user