mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
(Easy) Remove RCTNotAllowedInBridgeless validation for RCTRegisterModule
Summary: Changelog: [iOS][Internal] Remove RCTNotAllowedInBridgeless validation for RCTRegisterModule In the TurboModule system, `RCTRegisterModule` gets called for all `RCTBridgeModules` that calls `RCT_EXPORT_MODULE()` and it works fine in Bridgeless mode. Reviewed By: RSNara Differential Revision: D35203039 fbshipit-source-id: 8ae2be4487fe21653a7f1628fa92606a7d36d467
This commit is contained in:
committed by
Facebook GitHub Bot
parent
68fd1e5508
commit
a3bccdacc0
@@ -55,15 +55,11 @@ NSArray<Class> *RCTGetModuleClasses(void)
|
||||
/**
|
||||
* Register the given class as a bridge module. All modules must be registered
|
||||
* prior to the first bridge initialization.
|
||||
* TODO: (T115656171) Refactor RCTRegisterModule out of Bridge.m since it doesn't use the Bridge.
|
||||
*/
|
||||
void RCTRegisterModule(Class);
|
||||
void RCTRegisterModule(Class moduleClass)
|
||||
{
|
||||
RCTLogNewArchitectureValidation(
|
||||
RCTNotAllowedInBridgeless,
|
||||
@"RCTRegisterModule()",
|
||||
[NSString stringWithFormat:@"'%@' was registered unexpectedly", moduleClass]);
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
RCTModuleClasses = [NSMutableArray new];
|
||||
|
||||
Reference in New Issue
Block a user