Skip to content

Commit 60b08c6

Browse files
j-piaseckimeta-codesync[bot]
authored andcommitted
Cover react/nativemodule/webperformance with Stable API guards (#58123)
Summary: Pull Request resolved: #58123 Classifies `react/nativemodule/webperformance:webperformance` as a private target under the C++ stable API three-tier visibility model. Adds `#include <react/cxxstableapi/PrivateGuard.h>` to the module's single exported header (`NativePerformance.h`), and wires the guard dependency into BUCK, CMake, and the podspec. The guards are inert unless a consumer defines `RN_STRICT_API`, so there is no behavior change. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D117322371 fbshipit-source-id: e99c9d1f867a843da60f5166621cc7794dfbbe1e
1 parent 9682967 commit 60b08c6

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

packages/react-native/ReactCommon/react/nativemodule/webperformance/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ target_link_libraries(react_nativemodule_webperformance
1616
react_performance_timeline
1717
react_codegen_rncore
1818
react_cxxreact
19+
react_cxxstableapi
1920
)
2021
target_compile_reactnative_options(react_nativemodule_webperformance PRIVATE)
2122
target_compile_options(react_nativemodule_webperformance PRIVATE -Wpedantic -Wno-deprecated-declarations)

packages/react-native/ReactCommon/react/nativemodule/webperformance/NativePerformance.h

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

88
#pragma once
99

10+
#include <react/cxxstableapi/PrivateGuard.h>
11+
1012
#if __has_include("rncoreJSI.h") // Cmake headers on Android
1113
#include "rncoreJSI.h"
1214
#elif __has_include("FBReactNativeSpecJSI.h") // CocoaPod headers on Apple

packages/react-native/ReactCommon/react/nativemodule/webperformance/React-webperformancenativemodule.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Pod::Spec.new do |s|
5353

5454
s.dependency "ReactCommon/turbomodule/core"
5555
s.dependency "React-bridging"
56+
s.dependency "React-cxxstableapi"
5657

5758
add_dependency(s, "React-RCTFBReactNativeSpec")
5859
add_dependency(s, "React-performancetimeline")

0 commit comments

Comments
 (0)