mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Revert D75006354: Remove JSExecutor::performanceNow()
Differential Revision: D75006354 Original commit changeset: d41bf73238e9 Original Phabricator Diff: D75006354 fbshipit-source-id: 99c60268d8d829ff87a8486b0ca67a47bfb198b4
This commit is contained in:
1 parent
1eebb5aa11
commit
cbfa2ecc9a
6 files changed
+11
-5
No files matched your search
@@ -27,6 +27,10 @@ std::string JSExecutor::getSyntheticBundlePath(
|
||||
return buffer.data();
|
||||
}
|
||||
|
||||
HighResTimeStamp JSExecutor::performanceNow() {
|
||||
return HighResTimeStamp::now();
|
||||
}
|
||||
|
||||
jsinspector_modern::RuntimeTargetDelegate&
|
||||
JSExecutor::getRuntimeTargetDelegate() {
|
||||
if (!runtimeTargetDelegate_) {
|
||||
|
||||
@@ -139,6 +139,8 @@ 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 HighResTimeStamp::now().toDOMHighResTimeStamp();
|
||||
return JSExecutor::performanceNow().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 HighResTimeStamp::now();
|
||||
return JSExecutor::performanceNow();
|
||||
}
|
||||
|
||||
HighResTimeStamp NativePerformance::markWithResult(
|
||||
|
||||
+2
-2
@@ -98,7 +98,7 @@ void IntersectionObserverManager::observe(
|
||||
|
||||
if (!hasPendingTransactions) {
|
||||
auto entry = observer->updateIntersectionObservation(
|
||||
*rootShadowNode, HighResTimeStamp::now());
|
||||
*rootShadowNode, JSExecutor::performanceNow());
|
||||
if (entry) {
|
||||
{
|
||||
std::unique_lock lock(pendingEntriesMutex_);
|
||||
@@ -266,7 +266,7 @@ void IntersectionObserverManager::updateIntersectionObservations(
|
||||
}
|
||||
|
||||
auto entry = observer->updateIntersectionObservation(
|
||||
*rootShadowNode, HighResTimeStamp::now());
|
||||
*rootShadowNode, JSExecutor::performanceNow());
|
||||
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 = HighResTimeStamp::now();
|
||||
auto time = JSExecutor::performanceNow();
|
||||
|
||||
auto rootShadowNode = RootShadowNode::Shared{};
|
||||
shadowTreeRegistry_.visit(surfaceId, [&](const ShadowTree& shadowTree) {
|
||||
|
||||
Reference in new issue
Block a user