/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCommon/react/utils/jsi-utils.h
31 строка
871 B
TatianaKapos
Fix [Windows]: Rename utils/jsi files (#43700)
29 мар 2024, 06:03
29 мар 2024, 06:03
d0cac87
Код
Авторство
О чём код?
/* * 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. */ #pragma once #include <jsi/jsi.h> #include <string> namespace facebook::react { /** * Defines a property on the global object that is neither enumerable, nor * configurable, nor writable. This ensures that the private globals exposed by * ReactInstance cannot overwritten by third-party JavaScript code. It also * ensures that third-party JavaScript code unaware of these globals isn't able * to accidentally access them. In JavaScript, equivalent to: * * Object.defineProperty(global, propName, { * value: value * }) */ void defineReadOnlyGlobal( jsi::Runtime& runtime, const std::string& propName, jsi::Value&& value); } // namespace facebook::react