react-native-macos/ReactCommon/jsi
Neil Dhar 03b17d9af7 Clarify const-ness of JSI references
Summary:
Many operations on references in JS can modify the referent by
executing additional JS, including operations that we currently mark as
const such as `getProperty`. Because of this, the current distinction
between const and non-const operations on references like `jsi::Object`
is somewhat arbitrary.

A more consistent approach is to mark all operations as const, so that
it is clear that the const-ness applies to the reference and not the
referent. This is analogous to how smart pointers work, since something
like `const shared_ptr<T>` only makes the pointer const, as opposed to
`shared_ptr<const T>`.

This also gives users better guarantees and more flexibility in where
these references may be used.

Changelog:
[General][Changed] - Mark methods on JSI references as const.

Reviewed By: fbmal7

Differential Revision: D41599116

fbshipit-source-id: 40b1537581b09c5a34d0928ee04e7db2b50d26ea
2022-12-15 19:18:15 -08:00
..
jsi Clarify const-ness of JSI references 2022-12-15 19:18:15 -08:00
.clang-tidy The life-changing magic of clang-tidying up 2020-02-04 11:09:30 -08:00
BUCK Move JSCRuntime into its own folder (#35482) 2022-11-28 04:13:55 -08:00
CMakeLists.txt Expose `jscruntime` to be consumed via Prefab 2022-11-28 04:13:55 -08:00
React-jsi.podspec Bring back JSIDynamic and JSI together 2022-11-29 08:53:50 -08:00