mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
keep loadScript: private to RCTInstance (#37260)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37260 Changelog: [Internal] we don't need to expose this! Reviewed By: RSNara Differential Revision: D45582533 fbshipit-source-id: 77395d7bcedf4da5d92bd9519aeec2a440677d3c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d24f568c6f
commit
842a239cf5
@@ -242,11 +242,6 @@ NSString *const RCTHostDidReloadNotification = @"RCTHostDidReloadNotification";
|
||||
[_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];
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -261,7 +261,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
||||
__weak RCTInstance *weakInstance = self;
|
||||
if ([module respondsToSelector:@selector(setLoadScript:)]) {
|
||||
((id<RCTJSScriptLoaderModule>)module).loadScript = ^(RCTSource *source) {
|
||||
[weakInstance loadScript:(source)];
|
||||
[weakInstance loadScriptFromSource:(source)];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -303,11 +303,6 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadScript:(RCTSource *)source
|
||||
{
|
||||
[self loadScriptFromSource:source];
|
||||
}
|
||||
|
||||
- (void)registerSegmentWithId:(NSNumber *)segmentId path:(NSString *)path
|
||||
{
|
||||
if (_valid) {
|
||||
|
||||
Reference in New Issue
Block a user