Use string references in Fantom native module (#53274)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53274

Changelog: [internal]

Minor refactor

Reviewed By: rshest

Differential Revision: D80255982

fbshipit-source-id: 703f32a1edf5c225b0b07b3c519932ebe167b2c8
This commit is contained in:
Rubén Norte
2025-08-14 06:19:00 -07:00
committed by Facebook GitHub Bot
parent 256565cb11
commit 38e1e0de53
2 changed files with 4 additions and 4 deletions
@@ -118,7 +118,7 @@ jsi::Object NativeFantom::getFabricUpdateProps(
void NativeFantom::enqueueNativeEvent(
jsi::Runtime& /*runtime*/,
std::shared_ptr<const ShadowNode> shadowNode,
std::string type,
const std::string& type,
const std::optional<folly::dynamic>& payload,
std::optional<RawEvent::Category> category,
std::optional<bool> isUnique) {
@@ -285,7 +285,7 @@ void NativeFantom::startJSSamplingProfiler(jsi::Runtime& /*runtime*/) {
void NativeFantom::stopJSSamplingProfilerAndSaveToFile(
jsi::Runtime& runtime,
std::string filePath) {
const std::string& filePath) {
auto* hermesRootAPI =
jsi::castInterface<hermes::IHermesRootAPI>(hermes::makeHermesRootAPI());
hermesRootAPI->disableSamplingProfiler();
@@ -114,7 +114,7 @@ class NativeFantom : public NativeFantomCxxSpec<NativeFantom> {
void enqueueNativeEvent(
jsi::Runtime& runtime,
std::shared_ptr<const ShadowNode> shadowNode,
std::string type,
const std::string& type,
const std::optional<folly::dynamic>& payload,
std::optional<RawEvent::Category> category,
std::optional<bool> isUnique);
@@ -158,7 +158,7 @@ class NativeFantom : public NativeFantomCxxSpec<NativeFantom> {
void stopJSSamplingProfilerAndSaveToFile(
jsi::Runtime& runtime,
std::string filePath);
const std::string& filePath);
void setImageResponse(
jsi::Runtime& rt,