A framework for building native applications using React
Fix runtime shadow node reference corruption on measure (#45116)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45116 Changelog: [Internal] The UIManagerBinding `findShadowNodeByTag_DEPRECATED` method returns a shadow node and was updating the runtime reference on the shadow node with the created wrapper for the return value. The JSObject holding the wrapper would get deallocated, which would deallocate the wrapper stored on the shadow node. This would cause crashes on the next reference update for the shadow node, due to the shared_ptr being reassigned with the new value while it was already deallocated. The `sendAccessibilityEvent` function calls `findShadowNodeByTag_DEPRECATED` to get the shadow node referenced by the provided react tag, which could lead to runtime shadow node reference corruption. Reviewed By: sammy-SC Differential Revision: D58920296 fbshipit-source-id: ddb9ed0ee64bc01934aabde7070731dc53a2db70
N
Nick Lefever committed
72ce6ff03a3b192f529ba82b00925708f572fed6
Parent: 6bb75c7
Committed by Facebook GitHub Bot <[email protected]>
on 6/24/2024, 12:20:42 PM