mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
[rn][ios][0.74][RC6] decouple RCTBridge+Private from jsinspector-modern (#43708)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#import <jsinspector-modern/ReactCdp.h>
|
||||
#endif
|
||||
|
||||
@interface RCTBridge (Inspector)
|
||||
|
||||
/**
|
||||
* The HostTarget for this bridge, if one has been created. Exposed for RCTCxxBridge only.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly)
|
||||
#ifdef __cplusplus
|
||||
facebook::react::jsinspector_modern::PageTarget *
|
||||
#else
|
||||
// The inspector infrastructure cannot be used in C or Swift code.
|
||||
void *
|
||||
#endif
|
||||
inspectorTarget;
|
||||
|
||||
@property (nonatomic, readonly, getter=isInspectable) BOOL inspectable;
|
||||
|
||||
@end
|
||||
@@ -6,9 +6,6 @@
|
||||
*/
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#ifdef __cplusplus
|
||||
#import <jsinspector-modern/ReactCdp.h>
|
||||
#endif
|
||||
|
||||
@class RCTModuleRegistry;
|
||||
@class RCTModuleData;
|
||||
@@ -73,17 +70,6 @@ RCT_EXTERN void RCTRegisterModule(Class);
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
|
||||
|
||||
/**
|
||||
* The page target for this bridge, if one has been created. Exposed for RCTCxxBridge only.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly)
|
||||
#ifdef __cplusplus
|
||||
facebook::react::jsinspector_modern::PageTarget *
|
||||
#else
|
||||
// The inspector infrastructure cannot be used in C code.
|
||||
void *
|
||||
#endif
|
||||
inspectorTarget;
|
||||
@end
|
||||
|
||||
@interface RCTBridge (RCTCxxBridge)
|
||||
@@ -155,12 +141,6 @@ RCT_EXTERN void RCTRegisterModule(Class);
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTBridge (Inspector)
|
||||
|
||||
@property (nonatomic, readonly, getter=isInspectable) BOOL inspectable;
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTCxxBridge : RCTBridge
|
||||
|
||||
// TODO(cjhopman): this seems unsafe unless we require that it is only called on the main js queue.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTBridge+Inspector.h"
|
||||
#import "RCTBridge+Private.h"
|
||||
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#import <objc/runtime.h>
|
||||
|
||||
#import <FBReactNativeSpec/FBReactNativeSpec.h>
|
||||
#import <React/RCTBridge+Inspector.h>
|
||||
#import <React/RCTBridge+Private.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
#import <React/RCTConstants.h>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <future>
|
||||
|
||||
#import <React/RCTAssert.h>
|
||||
#import <React/RCTBridge+Inspector.h>
|
||||
#import <React/RCTBridge+Private.h>
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBridgeMethod.h>
|
||||
|
||||
+1
@@ -11,6 +11,7 @@
|
||||
|
||||
#import <React/NSDataBigString.h>
|
||||
#import <React/RCTAssert.h>
|
||||
#import <React/RCTBridge+Inspector.h>
|
||||
#import <React/RCTBridge+Private.h>
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
|
||||
Reference in New Issue
Block a user