mirror of
https://github.com/react/react-native.git
synced 2026-09-29 16:58:04 +08:00
[ReactNative] Remove unused executor context id
Summary: Remove `RCTGetExecutorID` and `RCTSetExecutorID`, it wasn't used anymore since the bridge was refactored into `RCTBridge` and `RCTBatchedBridge`.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
@property (nonatomic, strong, readonly) RCTBridge *batchedBridge;
|
||||
|
||||
- (void)_handleBuffer:(id)buffer context:(NSNumber *)context;
|
||||
- (void)_handleBuffer:(id)buffer;
|
||||
- (void)setUp;
|
||||
|
||||
@end
|
||||
@@ -57,7 +57,6 @@ RCT_EXPORT_MODULE()
|
||||
- (void)executeJSCall:(__unused NSString *)name
|
||||
method:(__unused NSString *)method
|
||||
arguments:(__unused NSArray *)arguments
|
||||
context:(__unused NSNumber *)executorID
|
||||
callback:(RCTJavaScriptCallback)onComplete
|
||||
{
|
||||
onComplete(nil, nil);
|
||||
@@ -155,7 +154,7 @@ RCT_EXPORT_MODULE(TestModule)
|
||||
NSArray *args = @[@1234, @5678, @"stringy", @{@"a": @1}, @42];
|
||||
NSArray *buffer = @[@[testModuleID], @[testMethodID], @[args], @[], @1234567];
|
||||
|
||||
[_bridge.batchedBridge _handleBuffer:buffer context:RCTGetExecutorID(executor)];
|
||||
[_bridge.batchedBridge _handleBuffer:buffer];
|
||||
|
||||
dispatch_sync(_methodQueue, ^{
|
||||
// clear the queue
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
{
|
||||
[super setUp];
|
||||
_executor = [[RCTContextExecutor alloc] init];
|
||||
RCTSetExecutorID(_executor);
|
||||
[_executor setUp];
|
||||
}
|
||||
|
||||
@@ -139,7 +138,6 @@ static uint64_t _get_time_nanoseconds(void)
|
||||
[_executor executeJSCall:@"module"
|
||||
method:@"method"
|
||||
arguments:params
|
||||
context:RCTGetExecutorID(_executor)
|
||||
callback:^(id json, __unused NSError *unused) {
|
||||
XCTAssert([json isEqual:@YES], @"Invalid return");
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user