Skip to content

Commit 6f25f3e

Browse files
Dawid Małeckimeta-codesync[bot]
authored andcommitted
Make StackTraceParser.h private in jserrorhandler
Summary: `StackTraceParser` is an implementation detail of `JsErrorHandler`: it is only used by `JsErrorHandler.cpp` and its own unit test, and `JsErrorHandler.h` does not include it. Mark it as a private header instead of a for-frameworks one. - Swap `FrameworksGuard.h` for `PrivateGuard.h` in `StackTraceParser.h`. - Include `JsErrorHandler.h` via its namespaced path so the header resolves when it is not exported alongside it. - Stop shipping `StackTraceParser.h` as a header for prebuilt `React-jserrorhandler` pods. Changelog: [Internal] Differential Revision: D122770464
1 parent e9fd982 commit 6f25f3e

5 files changed

Lines changed: 3 additions & 15 deletions

File tree

‎packages/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
3434
s.platforms = min_supported_versions
3535
s.source = source
3636
s.header_dir = "jserrorhandler"
37-
s.source_files = podspec_sources(["ErrorUtils.{cpp,h}", "JsErrorHandler.{cpp,h}", "StackTraceParser.{cpp,h}"], ["ErrorUtils.h", "JsErrorHandler.h", "StackTraceParser.h"])
37+
s.source_files = podspec_sources(["ErrorUtils.{cpp,h}", "JsErrorHandler.{cpp,h}", "StackTraceParser.{cpp,h}"], ["ErrorUtils.h", "JsErrorHandler.h"])
3838
s.pod_target_xcconfig = {
3939
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
4040
"USE_HEADERMAP" => "YES",

‎packages/react-native/ReactCommon/jserrorhandler/StackTraceParser.h‎

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

88
#pragma once
99

10-
#include <react/cxxstableapi/FrameworksGuard.h>
10+
#include <react/cxxstableapi/PrivateGuard.h>
1111

12+
#include <jserrorhandler/JsErrorHandler.h>
1213
#include <string>
1314
#include <vector>
14-
#include "JsErrorHandler.h"
1515

1616
namespace facebook::react {
1717

‎scripts/cxx-api/api-snapshots/ReactAndroidFrameworksCxx.api‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3788,10 +3788,6 @@ class facebook::react::SharedColor {
37883788
public std::string toString() const noexcept;
37893789
}
37903790

3791-
class facebook::react::StackTraceParser {
3792-
public static std::vector<facebook::react::JsErrorHandler::ProcessedError::StackFrame> parse(bool isHermes, const std::string& stackString);
3793-
}
3794-
37953791
class facebook::react::State {
37963792
protected State(facebook::react::StateData::Shared data, const facebook::react::State& previousState);
37973793
protected State(facebook::react::StateData::Shared data, facebook::react::ShadowNodeFamily::Weak family);

‎scripts/cxx-api/api-snapshots/ReactAppleFrameworksCxx.api‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6020,10 +6020,6 @@ class facebook::react::SharedColor {
60206020
public std::string toString() const noexcept;
60216021
}
60226022

6023-
class facebook::react::StackTraceParser {
6024-
public static std::vector<facebook::react::JsErrorHandler::ProcessedError::StackFrame> parse(bool isHermes, const std::string& stackString);
6025-
}
6026-
60276023
class facebook::react::State {
60286024
protected State(facebook::react::StateData::Shared data, const facebook::react::State& previousState);
60296025
protected State(facebook::react::StateData::Shared data, facebook::react::ShadowNodeFamily::Weak family);

‎scripts/cxx-api/api-snapshots/ReactCommonFrameworksCxx.api‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,10 +2383,6 @@ class facebook::react::SharedColor {
23832383
public std::string toString() const noexcept;
23842384
}
23852385

2386-
class facebook::react::StackTraceParser {
2387-
public static std::vector<facebook::react::JsErrorHandler::ProcessedError::StackFrame> parse(bool isHermes, const std::string& stackString);
2388-
}
2389-
23902386
class facebook::react::State {
23912387
protected State(facebook::react::StateData::Shared data, const facebook::react::State& previousState);
23922388
protected State(facebook::react::StateData::Shared data, facebook::react::ShadowNodeFamily::Weak family);

0 commit comments

Comments
 (0)