mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
256565cb11
commit
38e1e0de53
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user