mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
cleanup isMainQueueExecutionOfConstantToExportDisabled (#38542)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38542 Changelog: [Internal] never shipped, also seems not relevant after shipping TM bypass-github-export-checks Reviewed By: mdvacca, cipolleschi Differential Revision: D47620463 fbshipit-source-id: 8d9120c6cfec60e2b0b25badc46d4e35b18cfc61
This commit is contained in:
committed by
Facebook GitHub Bot
parent
74feb4cf6c
commit
659ecd47ba
@@ -8,7 +8,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <React/RCTInvalidating.h>
|
||||
#import "RCTDefines.h"
|
||||
|
||||
@protocol RCTBridgeMethod;
|
||||
@protocol RCTBridgeModule;
|
||||
@@ -112,6 +111,3 @@ typedef id<RCTBridgeModule> (^RCTBridgeModuleProvider)(void);
|
||||
@property (nonatomic, assign, readonly) BOOL implementsPartialBatchDidFlush;
|
||||
|
||||
@end
|
||||
|
||||
RCT_EXTERN void RCTSetIsMainQueueExecutionOfConstantsToExportDisabled(BOOL val);
|
||||
RCT_EXTERN BOOL RCTIsMainQueueExecutionOfConstantsToExportDisabled(void);
|
||||
|
||||
@@ -32,17 +32,6 @@ int32_t getUniqueId()
|
||||
return counter++;
|
||||
}
|
||||
}
|
||||
static BOOL isMainQueueExecutionOfConstantToExportDisabled = NO;
|
||||
|
||||
void RCTSetIsMainQueueExecutionOfConstantsToExportDisabled(BOOL val)
|
||||
{
|
||||
isMainQueueExecutionOfConstantToExportDisabled = val;
|
||||
}
|
||||
|
||||
BOOL RCTIsMainQueueExecutionOfConstantsToExportDisabled()
|
||||
{
|
||||
return isMainQueueExecutionOfConstantToExportDisabled;
|
||||
}
|
||||
|
||||
@implementation RCTModuleData {
|
||||
NSDictionary<NSString *, id> *_constantsToExport;
|
||||
@@ -461,7 +450,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init);
|
||||
BridgeNativeModulePerfLogger::moduleJSRequireEndingStart([moduleName UTF8String]);
|
||||
}
|
||||
|
||||
if (!RCTIsMainQueueExecutionOfConstantsToExportDisabled() && _requiresMainQueueSetup) {
|
||||
if (_requiresMainQueueSetup) {
|
||||
if (!RCTIsMainQueue()) {
|
||||
RCTLogWarn(@"Required dispatch_sync to load constants for %@. This may lead to deadlocks", _moduleClass);
|
||||
}
|
||||
|
||||
@@ -1030,9 +1030,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
||||
if (self.valid && ![moduleData.moduleClass isSubclassOfClass:[RCTCxxModule class]]) {
|
||||
[self->_performanceLogger appendStartForTag:RCTPLNativeModuleMainThread];
|
||||
(void)[moduleData instance];
|
||||
if (!RCTIsMainQueueExecutionOfConstantsToExportDisabled()) {
|
||||
[moduleData gatherConstants];
|
||||
}
|
||||
[moduleData gatherConstants];
|
||||
[self->_performanceLogger appendStopForTag:RCTPLNativeModuleMainThread];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user