mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove JSExecutor::performanceNow() (#51481)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51481 # Changelog: [Internal] This is replaced by `HighResTimeStamp::now()`, which is available in a dedicated smal `react/timing` module. Reviewed By: lenaic Differential Revision: D75006354 fbshipit-source-id: d41bf73238e9c6bf5c5a9509d60713ce11e6ea4a
This commit is contained in:
1 parent
84fa745be6
commit
6e50603faa
6 files changed
+5
-11
No files matched your search
@@ -27,10 +27,6 @@ std::string JSExecutor::getSyntheticBundlePath(
|
||||
return buffer.data();
|
||||
}
|
||||
|
||||
HighResTimeStamp JSExecutor::performanceNow() {
|
||||
return HighResTimeStamp::now();
|
||||
}
|
||||
|
||||
jsinspector_modern::RuntimeTargetDelegate&
|
||||
JSExecutor::getRuntimeTargetDelegate() {
|
||||
if (!runtimeTargetDelegate_) {
|
||||
|
||||
@@ -139,8 +139,6 @@ class RN_EXPORT JSExecutor {
|
||||
uint32_t bundleId,
|
||||
const std::string& bundlePath);
|
||||
|
||||
static HighResTimeStamp performanceNow();
|
||||
|
||||
/**
|
||||
* Get a reference to the \c RuntimeTargetDelegate owned (or implemented) by
|
||||
* this executor. This reference must remain valid for the duration of the
|
||||
|
||||
@@ -557,7 +557,7 @@ void bindNativePerformanceNow(Runtime& runtime) {
|
||||
const jsi::Value&,
|
||||
const jsi::Value* args,
|
||||
size_t /*count*/) {
|
||||
return JSExecutor::performanceNow().toDOMHighResTimeStamp();
|
||||
return HighResTimeStamp::now().toDOMHighResTimeStamp();
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ NativePerformance::NativePerformance(std::shared_ptr<CallInvoker> jsInvoker)
|
||||
: NativePerformanceCxxSpec(std::move(jsInvoker)) {}
|
||||
|
||||
HighResTimeStamp NativePerformance::now(jsi::Runtime& /*rt*/) {
|
||||
return JSExecutor::performanceNow();
|
||||
return HighResTimeStamp::now();
|
||||
}
|
||||
|
||||
HighResTimeStamp NativePerformance::markWithResult(
|
||||
|
||||
+2
-2
@@ -98,7 +98,7 @@ void IntersectionObserverManager::observe(
|
||||
|
||||
if (!hasPendingTransactions) {
|
||||
auto entry = observer->updateIntersectionObservation(
|
||||
*rootShadowNode, JSExecutor::performanceNow());
|
||||
*rootShadowNode, HighResTimeStamp::now());
|
||||
if (entry) {
|
||||
{
|
||||
std::unique_lock lock(pendingEntriesMutex_);
|
||||
@@ -266,7 +266,7 @@ void IntersectionObserverManager::updateIntersectionObservations(
|
||||
}
|
||||
|
||||
auto entry = observer->updateIntersectionObservation(
|
||||
*rootShadowNode, JSExecutor::performanceNow());
|
||||
*rootShadowNode, HighResTimeStamp::now());
|
||||
if (entry) {
|
||||
{
|
||||
std::unique_lock lock(pendingEntriesMutex_);
|
||||
|
||||
@@ -638,7 +638,7 @@ void UIManager::shadowTreeDidFinishTransaction(
|
||||
void UIManager::reportMount(SurfaceId surfaceId) const {
|
||||
TraceSection s("UIManager::reportMount");
|
||||
|
||||
auto time = JSExecutor::performanceNow();
|
||||
auto time = HighResTimeStamp::now();
|
||||
|
||||
auto rootShadowNode = RootShadowNode::Shared{};
|
||||
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree& shadowTree) {
|
||||
|
||||
Reference in new issue
Block a user