mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
delete RCTJSScriptLoaderModule (#37284)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37284 Changelog: [iOS][Removed] in the past, we had this protocol so we could decorate the `RCTDevSplitBundleLoader`, which was removed by motiz88. now that doesn't exist anymore, we should delete this protocol. i did a quick grep on github and this protocol was only used by `RCTDevSplitBundleLoader`, so i don't think this will be a major breaking change Reviewed By: christophpurrer Differential Revision: D45591882 fbshipit-source-id: 23656d0c04fa4e1c4cfc65b1052d4c3614ba8708
This commit is contained in:
committed by
Facebook GitHub Bot
parent
842a239cf5
commit
438f6cf591
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@class RCTSource;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* This protocol should be adopted when a turbo module needs to tell React Native to load a script.
|
||||
* In bridge-less React Native, it is a replacement for [_bridge loadAndExecuteSplitBundleURL:].
|
||||
*/
|
||||
@protocol RCTJSScriptLoaderModule <NSObject>
|
||||
|
||||
@property (nonatomic, copy) void (^loadScript)(RCTSource *source);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -19,7 +19,6 @@
|
||||
#import <React/RCTDisplayLink.h>
|
||||
#import <React/RCTEventDispatcherProtocol.h>
|
||||
#import <React/RCTFollyConvert.h>
|
||||
#import <React/RCTJSScriptLoaderModule.h>
|
||||
#import <React/RCTJavaScriptLoader.h>
|
||||
#import <React/RCTLog.h>
|
||||
#import <React/RCTLogBox.h>
|
||||
@@ -259,12 +258,6 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
||||
- (void)_attachBridgelessAPIsToModule:(id<RCTTurboModule>)module FB_OBJC_DIRECT
|
||||
{
|
||||
__weak RCTInstance *weakInstance = self;
|
||||
if ([module respondsToSelector:@selector(setLoadScript:)]) {
|
||||
((id<RCTJSScriptLoaderModule>)module).loadScript = ^(RCTSource *source) {
|
||||
[weakInstance loadScriptFromSource:(source)];
|
||||
};
|
||||
}
|
||||
|
||||
if ([module respondsToSelector:@selector(setDispatchToJSThread:)]) {
|
||||
((id<RCTJSDispatcherModule>)module).dispatchToJSThread = ^(dispatch_block_t block) {
|
||||
__strong __typeof(self) strongSelf = weakInstance;
|
||||
|
||||
Reference in New Issue
Block a user