Skip to content

Commit 2b83552

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Remove dead include from RCTInstance.h (#58181)
Summary: Pull Request resolved: #58181 Under the C++ Stable API RFC, `jserrorhandler:jserrorhandler` is a "for frameworks" module, but it was still reached from a public header: - The iOS and macOS `RCTInstance.h` included `react/runtime/ReactInstance.h`, which in turn includes `jserrorhandler/JsErrorHandler.h`. Neither `RCTInstance.h` names `ReactInstance` or `JsErrorHandler`; the only C++ types they use are `JSRuntimeFactory` and `jsinspector_modern::HostTarget`, both already included directly. The include is dead and is simply removed. - `RCTInstance.mm` does name both types and was relying on the include transitively, so `react/runtime/ReactInstance.h` and `jserrorhandler/JsErrorHandler.h` move to the implementation file on both platforms. Changelog: [Internal] Reviewed By: javache Differential Revision: D117842042 fbshipit-source-id: 1b1e1545acbfc01be12d2af0ddc84d6b1ecf4ca3
1 parent 8f9232b commit 2b83552

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#import <React/RCTJavaScriptLoader.h>
1414
#import <jsinspector-modern/ReactCdp.h>
1515
#import <react/runtime/JSRuntimeFactory.h>
16-
#import <react/runtime/ReactInstance.h>
1716

1817
#import "RCTContextContainerHandling.h"
1918

packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@
3737
#import <ReactCommon/RCTTurboModuleManager.h>
3838
#import <ReactCommon/RuntimeExecutor.h>
3939
#import <cxxreact/ReactMarker.h>
40+
#import <jserrorhandler/JsErrorHandler.h>
4041
#import <jsinspector-modern/InspectorFlags.h>
4142
#import <jsinspector-modern/ReactCdp.h>
4243
#import <jsireact/JSIExecutor.h>
4344
#import <react/featureflags/ReactNativeFeatureFlags.h>
45+
#import <react/runtime/ReactInstance.h>
4446
#import <react/utils/ContextContainer.h>
4547
#import <react/utils/FollyConvert.h>
4648
#import <react/utils/ManagedObjectWrapper.h>

0 commit comments

Comments
 (0)