mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Replace private bridge categories with private header
Summary: public A lot of the core modules have to use private methods in the bridge, specially since the `RCTBatchedBridge` interface is never exposed. That was leading to a lot of different private bridge categories spread across different modules, which makes harder to identify which modules are affected by private API changes. Replace all the categories with a single private header. Reviewed By: nicklockwood Differential Revision: D2757564 fb-gh-sync-id: 793158b9082d542b74a6094ed0db4d5dc3a88f78
This commit is contained in:
committed by
facebook-github-bot-1
parent
03a0e4ee2b
commit
2d61dfd9c1
@@ -16,6 +16,7 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTBridge+Private.h"
|
||||
#import "RCTContextExecutor.h"
|
||||
#import "RCTModuleMethod.h"
|
||||
#import "RCTRootView.h"
|
||||
@@ -29,12 +30,6 @@ while ((CONDITION) && [timeout timeIntervalSinceNow] > 0) { \
|
||||
} \
|
||||
_Pragma("clang diagnostic pop")
|
||||
|
||||
@interface RCTBridge (RCTAllocationTests)
|
||||
|
||||
@property (nonatomic, weak) RCTBridge *batchedBridge;
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTJavaScriptContext : NSObject
|
||||
|
||||
@property (nonatomic, assign, readonly) JSGlobalContextRef ctx;
|
||||
|
||||
@@ -16,19 +16,11 @@
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTBridge+Private.h"
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTJavaScriptExecutor.h"
|
||||
#import "RCTUtils.h"
|
||||
|
||||
@interface RCTBridge (Testing)
|
||||
|
||||
@property (nonatomic, strong, readonly) RCTBridge *batchedBridge;
|
||||
|
||||
- (void)handleBuffer:(id)buffer;
|
||||
- (void)setUp;
|
||||
|
||||
@end
|
||||
|
||||
@interface TestExecutor : NSObject <RCTJavaScriptExecutor>
|
||||
|
||||
@property (nonatomic, readonly, copy) NSMutableDictionary<NSString *, id> *injectedStuff;
|
||||
|
||||
Reference in New Issue
Block a user