Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete RCTJSScriptLoaderModule #37284

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions packages/react-native/React/Base/RCTJSScriptLoaderModule.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,6 @@ - (void)callFunctionOnModule:(NSString *)moduleName method:(NSString *)method ar
[_instance callFunctionOnModule:moduleName method:method args:args];
}

- (void)loadScript:(RCTSource *)source
{
[_instance loadScript:source];
}

- (void)registerSegmentWithId:(NSNumber *)segmentId path:(NSString *)path
{
[_instance registerSegmentWithId:segmentId path:path];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ FB_RUNTIME_PROTOCOL
*/
- (void)callFunctionOnModule:(NSString *)moduleName method:(NSString *)method args:(NSArray *)args;

/**
* Loads the JS bundle asynchronously.
*/
- (void)loadScript:(RCTSource *)source;

/**
* Registers a new JS segment.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -259,12 +258,6 @@ - (Class)getModuleClassFromName:(const char *)name
- (void)_attachBridgelessAPIsToModule:(id<RCTTurboModule>)module FB_OBJC_DIRECT
{
__weak RCTInstance *weakInstance = self;
if ([module respondsToSelector:@selector(setLoadScript:)]) {
((id<RCTJSScriptLoaderModule>)module).loadScript = ^(RCTSource *source) {
[weakInstance loadScript:(source)];
};
}

if ([module respondsToSelector:@selector(setDispatchToJSThread:)]) {
((id<RCTJSDispatcherModule>)module).dispatchToJSThread = ^(dispatch_block_t block) {
__strong __typeof(self) strongSelf = weakInstance;
Expand Down Expand Up @@ -303,11 +296,6 @@ - (void)callFunctionOnModule:(NSString *)moduleName method:(NSString *)method ar
}
}

- (void)loadScript:(RCTSource *)source
{
[self loadScriptFromSource:source];
}

- (void)registerSegmentWithId:(NSNumber *)segmentId path:(NSString *)path
{
if (_valid) {
Expand Down