mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: A key difference in WeakRefs with the Hades GC is that they are mutable, in the sense that reading the value of a WeakRef while a GC is active might clear the WeakRef. For this reason, attempting to lock the WeakObject might mutate the backing reference. I preferred to communicate this change in behavior via the API rather than `const_cast` it away inside the implementation. Changelog: [Internal] Change jsi::WeakObject to be mutable in lockWeakObject Reviewed By: mhorowitz Differential Revision: D21485758 fbshipit-source-id: 3618928be8f8791aed56cb20673896ff5b786ded