Fully remove usage of timed runtime
Summary:
Re-land of D42923921 (1c8179b9b1
), which was backed out due to a flow-error.
---
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D43152663
fbshipit-source-id: 03b2fe096ac3b8b996d032b13c6d5c74ba2b1952
This commit is contained in:
Родитель
afec07aca2
Коммит
c80b0eaf92
|
@ -123,6 +123,9 @@ rn_xplat_cxx_library(
|
|||
for header in CXXREACT_PUBLIC_HEADERS
|
||||
]),
|
||||
compiler_flags_pedantic = True,
|
||||
exported_preprocessor_flags = [
|
||||
"-DWITH_FBSYSTRACE=1",
|
||||
],
|
||||
fbandroid_preprocessor_flags = get_android_inspector_flags(),
|
||||
fbobjc_compiler_flags = get_apple_compiler_flags(),
|
||||
fbobjc_force_static = True,
|
||||
|
@ -134,7 +137,6 @@ rn_xplat_cxx_library(
|
|||
platforms = (ANDROID, APPLE, CXX),
|
||||
preprocessor_flags = [
|
||||
"-DLOG_TAG=\"ReactNative\"",
|
||||
"-DWITH_FBSYSTRACE=1",
|
||||
],
|
||||
tests = [
|
||||
react_native_xplat_target("cxxreact/tests:tests"),
|
||||
|
|
|
@ -27,12 +27,6 @@ namespace react {
|
|||
|
||||
namespace {
|
||||
|
||||
std::unique_ptr<HermesRuntime> makeHermesRuntimeSystraced(
|
||||
const ::hermes::vm::RuntimeConfig &runtimeConfig) {
|
||||
SystraceSection s("HermesExecutorFactory::makeHermesRuntimeSystraced");
|
||||
return hermes::makeHermesRuntime(runtimeConfig);
|
||||
}
|
||||
|
||||
class HermesExecutorRuntimeAdapter
|
||||
: public facebook::hermes::inspector::RuntimeAdapter {
|
||||
public:
|
||||
|
@ -189,8 +183,12 @@ void HermesExecutorFactory::setDebuggerName(const std::string &debuggerName) {
|
|||
std::unique_ptr<JSExecutor> HermesExecutorFactory::createJSExecutor(
|
||||
std::shared_ptr<ExecutorDelegate> delegate,
|
||||
std::shared_ptr<MessageQueueThread> jsQueue) {
|
||||
std::unique_ptr<HermesRuntime> hermesRuntime =
|
||||
makeHermesRuntimeSystraced(runtimeConfig_);
|
||||
std::unique_ptr<HermesRuntime> hermesRuntime;
|
||||
{
|
||||
SystraceSection s("makeHermesRuntime");
|
||||
hermesRuntime = hermes::makeHermesRuntime(runtimeConfig_);
|
||||
}
|
||||
|
||||
HermesRuntime &hermesRuntimeRef = *hermesRuntime;
|
||||
auto decoratedRuntime = std::make_shared<DecoratedRuntime>(
|
||||
std::move(hermesRuntime),
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
// Declarations for functionality exposed by Hermes' TimerStats decorator.
|
||||
//
|
||||
// For backwards-compatibility, code that uses such functionality must also
|
||||
// check explicitly at run-time whether the object(s) and method(s) exist, and
|
||||
// fail safely if not.
|
||||
|
||||
/**
|
||||
* JSITimerInternalType is the global object installed by Hermes' TimedRuntime
|
||||
* decorator, and it is used to extract runtime timing information.
|
||||
*/
|
||||
declare type $JSITimerInternalType = {
|
||||
/**
|
||||
* Returns the counters that TimedRuntime keep track.
|
||||
* There are no guarantees about what keys exist in it, but they can be
|
||||
* printed for informational purposes.
|
||||
* @return An object that maps strings to various types of performance
|
||||
* statistics.
|
||||
*/
|
||||
+getTimes?: () => {[string]: number | string, ...},
|
||||
};
|
Загрузка…
Ссылка в новой задаче