From 991d29beac815e573d6f1730243db9b579514855 Mon Sep 17 00:00:00 2001 From: Phillip Pan Date: Wed, 3 May 2023 12:08:19 -0700 Subject: [PATCH] do not expose logger from RCTHost (#37235) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37235 Changelog: [Internal] we shouldn't expose the logger, only need to expose the logging information Reviewed By: javache Differential Revision: D45513780 fbshipit-source-id: b82496ebcbf87d7f88d6c7e1afea655d4177a0d8 --- .../ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.h | 3 +-- .../react/bridgeless/platform/ios/Core/RCTHost.mm | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.h b/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.h index 338acf48017d07..8fd3b488f93651 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.h +++ b/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.h @@ -20,7 +20,6 @@ NS_ASSUME_NONNULL_BEGIN @class RCTFabricSurface; @class RCTJSThreadManager; @class RCTModuleRegistry; -@class RCTPerformanceLogger; @protocol RCTInstanceDelegate; FB_RUNTIME_PROTOCOL @protocol RCTTurboModuleManagerDelegate; @@ -74,7 +73,7 @@ RCT_EXTERN NSString *const RCTHostDidReloadNotification; - (RCTModuleRegistry *)getModuleRegistry FB_OBJC_DIRECT; -- (RCTPerformanceLogger *)getPerformanceLogger FB_OBJC_DIRECT; +- (NSArray *)getLoggingData FB_OBJC_DIRECT; - (RCTSurfacePresenter *)getSurfacePresenter FB_OBJC_DIRECT; diff --git a/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.mm b/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.mm index 7a251ccc9e9c11..6861a66a88a21c 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.mm +++ b/packages/react-native/ReactCommon/react/bridgeless/platform/ios/Core/RCTHost.mm @@ -14,6 +14,7 @@ #import #import #import +#import #import using namespace facebook::react; @@ -201,9 +202,9 @@ - (RCTModuleRegistry *)getModuleRegistry return _moduleRegistry; } -- (RCTPerformanceLogger *)getPerformanceLogger +- (NSArray *)getLoggingData { - return [_instance performanceLogger]; + return [[_instance performanceLogger] valuesForTags]; } - (RCTSurfacePresenter *)getSurfacePresenter