preventing future build failures (#51890)

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

changelog: [internal]

Fixing possible build failures when targets are built in different context:
- Adding includes to used std functions.
- Using explicit jsi namespace.
- Declaring dependency.

Reviewed By: javache

Differential Revision: D74878821

fbshipit-source-id: 9dfd7ba94651280331be6c9fe6948fce50955589
This commit is contained in:
Samuel Susla
2025-06-09 03:43:13 -07:00
committed by Facebook GitHub Bot
parent 90b64a4d50
commit 5d76fe662a
3 changed files with 5 additions and 2 deletions
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
#include <jsi/jsi.h>
#include <jsinspector-modern/RuntimeTarget.h>
#include "HermesRuntimeSamplingProfileSerializer.h"
@@ -39,12 +40,12 @@ class HermesRuntimeSamplingProfileDelegate {
: hermesRuntime_(std::move(hermesRuntime)) {}
void startSampling() {
auto* hermesAPI = castInterface<IHermesRootAPI>(makeHermesRootAPI());
auto* hermesAPI = jsi::castInterface<IHermesRootAPI>(makeHermesRootAPI());
hermesAPI->enableSamplingProfiler(HERMES_SAMPLING_FREQUENCY_HZ);
}
void stopSampling() {
auto* hermesAPI = castInterface<IHermesRootAPI>(makeHermesRootAPI());
auto* hermesAPI = jsi::castInterface<IHermesRootAPI>(makeHermesRootAPI());
hermesAPI->disableSamplingProfiler();
}
@@ -15,6 +15,7 @@
#include <functional>
#include <mutex>
#include <string>
#include <unordered_map>
namespace facebook::react::jsinspector_modern {
@@ -7,6 +7,7 @@
#pragma once
#include <glog/logging.h>
#include <react/debug/react_native_expect.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/graphics/Float.h>