react-native-macos/ReactCommon
Valentin Shergin 3aba90b58a Fabric: Workaround for mysterious crash in `synchronouslyUpdateViewOnUIThread:props:`.
Summary:
We are seeing some non-trivial amount of crashes happened because `[RCTSurfacePresenter synchronouslyUpdateViewOnUIThread:props:]` requests a Component Descriptor which does not register in the registry.
And the problem here is that ComponentDescriptors are not being designed to be used outside of C++ UIManager, and we only use that in RCTSurfacePresenter only because it's an old workaround that makes Native Animation Driver works with Fabric.

Messing with ComponentDescriptors are in general dangerous. Accessing them outside of UIManager means that they might be deallocated at any time, extending their lifetime will cause other crashes on the other side. So, that's why this is "BROKEN".

This diff does not make the code worse, it just designates the problem that was there for a long time, so it kinda makes it better.

We don't know for sure why some ComponentDescriptors are not registered but this diff at least makes it not crash in such case.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D18869651

fbshipit-source-id: 9d945ac7a2bd24a69a9bbb83b4fdd3cd19808f87
2019-12-06 17:58:35 -08:00
..
better Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
callinvoker Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
config Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
cxxreact Remove __unused annotation from ConcreteSystraceSection ctor args 2019-11-19 10:51:59 -08:00
fabric Fabric: Workaround for mysterious crash in `synchronouslyUpdateViewOnUIThread:props:`. 2019-12-06 17:58:35 -08:00
hermes/inspector Convert easy files to flow strict-local 2019-12-05 16:06:46 -08:00
jsi Remove compact parameter from heap snapshots 2019-10-31 14:48:01 -07:00
jsiexecutor Tidy up license headers [3/n] 2019-10-16 10:06:34 -07:00
jsinspector Tidy up license headers [2/n] 2019-10-16 10:06:34 -07:00
microprofiler Tidy up license headers [1/n] 2019-10-16 10:06:33 -07:00
turbomodule Stop using RCTConvert to convert between primitive types 2019-11-18 10:58:50 -08:00
utils Fabric: Cross-platform implementation of `monotonicTimeInMilliseconds` 2019-11-04 18:21:12 -08:00
yoga Remove bitfield.h 2019-11-27 14:20:47 -08:00
React-Fabric.podspec Back out "Fixes Fabric related podspec" 2019-11-01 19:34:46 -07:00
ReactCommon.podspec Move non-license comments out of license header 2019-10-15 20:12:12 -07:00
common.mk More robust hermes-engine lookup logic in makefiles (#26820) 2019-10-14 19:21:43 -07:00