Skip to content

Commit 891b7da

Browse files
christophpurrermeta-codesync[bot]
authored andcommitted
Delete stub RCTAppSetupDefaultJsExecutorFactory (#59435)
Summary: Pull Request resolved: #59435 The default JS executor factory unconditionally returns `nullptr` and has no callers. Delete it with its now-unused imports and forward declarations, narrowing the header to forward declarations. Changelog: [Internal] Reviewed By: andrewdacenko Differential Revision: D127294774
1 parent 090148b commit 891b7da

3 files changed

Lines changed: 7 additions & 26 deletions

File tree

‎packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h‎

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,21 @@
66
*/
77

88
#import <Foundation/Foundation.h>
9-
#import <React/RCTBridge.h>
10-
#import <React/RCTRootView.h>
119

12-
#ifdef __cplusplus
10+
@class RCTBridge;
11+
@class RCTRootView;
1312

14-
#import <memory>
13+
#ifdef __cplusplus
1514

1615
#import <ReactCommon/RCTTurboModuleManager.h>
1716

1817
@protocol RCTDependencyProvider;
1918

20-
// Forward declaration to decrease compilation coupling
21-
namespace facebook::react {
22-
class JSExecutorFactory;
23-
class RuntimeScheduler;
24-
} // namespace facebook::react
2519
RCT_EXTERN NSArray<NSString *> *RCTAppSetupUnstableModulesRequiringMainQueueSetup(
2620
id<RCTDependencyProvider> dependencyProvider);
2721

2822
RCT_EXTERN id<RCTTurboModule> RCTAppSetupDefaultModuleFromClass(
2923
Class moduleClass,
3024
id<RCTDependencyProvider> dependencyProvider);
3125

32-
std::unique_ptr<facebook::react::JSExecutorFactory> RCTAppSetupDefaultJsExecutorFactory(
33-
RCTBridge *bridge,
34-
RCTTurboModuleManager *turboModuleManager,
35-
const std::shared_ptr<facebook::react::RuntimeScheduler> &runtimeScheduler);
36-
3726
#endif // __cplusplus

‎packages/react-native/Libraries/AppDelegate/RCTAppSetupUtils.mm‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
#import "RCTAppSetupUtils.h"
99

10-
#import <cxxreact/JSExecutor.h>
11-
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
12-
#import <react/renderer/runtimescheduler/RuntimeSchedulerBinding.h>
13-
1410
// Turbo Module
1511
#import <React/RCTBundleAssetImageLoader.h>
1612
#import <React/RCTDataRequestHandler.h>
@@ -92,11 +88,3 @@
9288
// No custom initializer here.
9389
return [moduleClass new];
9490
}
95-
96-
std::unique_ptr<facebook::react::JSExecutorFactory> RCTAppSetupDefaultJsExecutorFactory(
97-
RCTBridge *bridge,
98-
RCTTurboModuleManager *turboModuleManager,
99-
const std::shared_ptr<facebook::react::RuntimeScheduler> &runtimeScheduler)
100-
{
101-
return nullptr;
102-
}

‎packages/react-native/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#import "RCTDefaultReactNativeFactoryDelegate.h"
9+
#import <React/RCTRootView.h>
910
#import <ReactCommon/RCTHost.h>
1011
#import "RCTAppSetupUtils.h"
1112
#import "RCTDependencyProvider.h"
@@ -47,10 +48,13 @@ - (JSRuntimeFactoryRef)createJSRuntimeFactory
4748
#endif
4849
}
4950

51+
#pragma clang diagnostic push
52+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
5053
- (void)customizeRootView:(RCTRootView *)rootView
5154
{
5255
// Override point for customization after application launch.
5356
}
57+
#pragma clang diagnostic pop
5458

5559
- (RCTColorSpace)defaultColorSpace
5660
{

0 commit comments

Comments
 (0)