Files
react-native/ReactCommon
Valentin Shergin 68150914f5 Fabric: Storing component's handle and name inside ShadowNodeFamily object
Summary:
Before this change, all methods `ShadowNode::getComponentHandle()` and `ShadowNode::getComponentHandle()` returned the values directly from a `ComponentDescriptor` (via `ShadowNodeFamily`). Now, we store/cache those values in ShadowNodeFamily object (and ShadowNode's methods use that).

We need that to ensure that calling those methods doesn't access the `ComponentDescriptor` object because it's difficult to guarantee that this object overlives all `ShadowNode`s. This is especially important when we build `ShadowView`s from `ShadowNode`s: this might happen way after the code is already deallocated and the only living objects are MountingTransactionCoordinator and essentially two pointers to root nodes of before and after trees (that still needs to be mounted).

This diff introduces no actual changes in the ownership model.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D18290024

fbshipit-source-id: 4135a277515a84b053fe0d0dde48fba59bf2aae3
2019-11-02 23:29:42 -07:00
..
2019-10-16 10:06:34 -07:00
2019-10-16 10:06:34 -07:00
2019-10-16 10:06:34 -07:00
2019-10-16 10:06:34 -07:00
2019-10-16 10:06:34 -07:00
2019-11-02 20:42:54 -07:00