Skip to content

Commit 598d945

Browse files
coadometa-codesync[bot]
authored andcommitted
Make StackTraceParser.h private in jserrorhandler (#58793)
Summary: Pull Request resolved: #58793 `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] Reviewed By: cipolleschi Differential Revision: D122770464 fbshipit-source-id: fb51d85fcd52f18cf1254c873b94bef89c8a2a6f
1 parent 55893c5 commit 598d945

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
@@ -3757,10 +3757,6 @@ class facebook::react::SharedColor {
37573757
public std::string toString() const noexcept;
37583758
}
37593759

3760-
class facebook::react::StackTraceParser {
3761-
public static std::vector<facebook::react::JsErrorHandler::ProcessedError::StackFrame> parse(bool isHermes, const std::string& stackString);
3762-
}
3763-
37643760
class facebook::react::State {
37653761
protected State(facebook::react::StateData::Shared data, const facebook::react::State& previousState);
37663762
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
@@ -5973,10 +5973,6 @@ class facebook::react::SharedColor {
59735973
public std::string toString() const noexcept;
59745974
}
59755975

5976-
class facebook::react::StackTraceParser {
5977-
public static std::vector<facebook::react::JsErrorHandler::ProcessedError::StackFrame> parse(bool isHermes, const std::string& stackString);
5978-
}
5979-
59805976
class facebook::react::State {
59815977
protected State(facebook::react::StateData::Shared data, const facebook::react::State& previousState);
59825978
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
@@ -2352,10 +2352,6 @@ class facebook::react::SharedColor {
23522352
public std::string toString() const noexcept;
23532353
}
23542354

2355-
class facebook::react::StackTraceParser {
2356-
public static std::vector<facebook::react::JsErrorHandler::ProcessedError::StackFrame> parse(bool isHermes, const std::string& stackString);
2357-
}
2358-
23592355
class facebook::react::State {
23602356
protected State(facebook::react::StateData::Shared data, const facebook::react::State& previousState);
23612357
protected State(facebook::react::StateData::Shared data, facebook::react::ShadowNodeFamily::Weak family);

0 commit comments

Comments
 (0)