/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCommon/jsitooling/react/runtime/JSRuntimeFactory.cpp
29 строк
727 B
Oskar Kwaśniewski
feat: add jsitooling package (#49348)
13 фев 2025, 19:49
13 фев 2025, 19:49
31a8bb3
Код
Авторство
О чём код?
/* * 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. */ #include "JSRuntimeFactory.h" namespace facebook::react { jsi::Runtime& JSIRuntimeHolder::getRuntime() noexcept { return *runtime_; } JSIRuntimeHolder::JSIRuntimeHolder(std::unique_ptr<jsi::Runtime> runtime) : runtime_(std::move(runtime)) { assert(runtime_ != nullptr); } jsinspector_modern::RuntimeTargetDelegate& JSRuntime::getRuntimeTargetDelegate() { if (!runtimeTargetDelegate_) { runtimeTargetDelegate_.emplace(getRuntime().description()); } return *runtimeTargetDelegate_; } } // namespace facebook::react