Skip to content

Commit cbad8aa

Browse files
philIipfacebook-github-bot
authored andcommitted
cleanup rn_ama_new_arch_ios.bridge_batch_did_complete_fix (#50598)
Summary: Pull Request resolved: #50598 changelog: [ios][breaking] delete BridgeModuleBatchDidComplete config helpers this is not used anywhere, cleanup Reviewed By: srinathvijay Differential Revision: D72692359 fbshipit-source-id: 42220a64be59bc0d32efe76c1f1d8fc4508a6b0e
1 parent 89bcbed commit cbad8aa

File tree

3 files changed

+6
-32
lines changed

3 files changed

+6
-32
lines changed

packages/react-native/React/Base/RCTBridge.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ void RCTSetTurboModuleInteropBridgeProxyLogLevel(RCTBridgeProxyLoggingLevel logL
8282
BOOL RCTTurboModuleInteropForAllTurboModulesEnabled(void);
8383
void RCTEnableTurboModuleInteropForAllTurboModules(BOOL enabled);
8484

85-
BOOL RCTBridgeModuleBatchDidCompleteDisabled(void);
86-
void RCTDisableBridgeModuleBatchDidComplete(BOOL disabled);
87-
8885
typedef enum {
8986
kRCTGlobalScope,
9087
kRCTGlobalScopeUsingRetainJSCallback,

packages/react-native/React/Base/RCTBridge.mm

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -254,17 +254,6 @@ void RCTEnableTurboModuleSyncVoidMethods(BOOL enabled)
254254
gTurboModuleEnableSyncVoidMethods = enabled;
255255
}
256256

257-
static BOOL gBridgeModuleDisableBatchDidComplete = NO;
258-
BOOL RCTBridgeModuleBatchDidCompleteDisabled(void)
259-
{
260-
return gBridgeModuleDisableBatchDidComplete;
261-
}
262-
263-
void RCTDisableBridgeModuleBatchDidComplete(BOOL disabled)
264-
{
265-
gBridgeModuleDisableBatchDidComplete = disabled;
266-
}
267-
268257
BOOL kDispatchAccessibilityManagerInitOntoMain = NO;
269258
BOOL RCTUIManagerDispatchAccessibilityManagerInitOntoMain(void)
270259
{

packages/react-native/React/CxxBridge/RCTCxxBridge.mm

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,27 +1458,15 @@ - (void)registerSegmentWithId:(NSUInteger)segmentId path:(NSString *)path
14581458

14591459
- (void)batchDidComplete
14601460
{
1461-
if (RCTBridgeModuleBatchDidCompleteDisabled()) {
1462-
id uiManager = [self moduleForName:@"UIManager"];
1463-
if ([uiManager respondsToSelector:@selector(batchDidComplete)] &&
1464-
[uiManager respondsToSelector:@selector(methodQueue)]) {
1461+
// TODO #12592471: batchDidComplete is only used by RCTUIManager,
1462+
// can we eliminate this special case?
1463+
for (RCTModuleData *moduleData in _moduleDataByID) {
1464+
if (moduleData.implementsBatchDidComplete) {
14651465
[self
14661466
dispatchBlock:^{
1467-
[uiManager batchDidComplete];
1467+
[moduleData.instance batchDidComplete];
14681468
}
1469-
queue:[uiManager methodQueue]];
1470-
}
1471-
} else {
1472-
// TODO #12592471: batchDidComplete is only used by RCTUIManager,
1473-
// can we eliminate this special case?
1474-
for (RCTModuleData *moduleData in _moduleDataByID) {
1475-
if (moduleData.implementsBatchDidComplete) {
1476-
[self
1477-
dispatchBlock:^{
1478-
[moduleData.instance batchDidComplete];
1479-
}
1480-
queue:moduleData.methodQueue];
1481-
}
1469+
queue:moduleData.methodQueue];
14821470
}
14831471
}
14841472
}

0 commit comments

Comments
 (0)