Files
react-native/ReactCommon
Valentin Shergin c34e554275 Fabric: Fixes UB/broken font weight management on iOS
Summary:
Address Sanitizer told me that I have UB in `RCTUIFontWeightFromFloat` and it was right. After a short investigation, I find out that the original assumption that `UIFontWeight` values are practically numbers from 100 to 900 was incorrect. In my simulator, it's something like from `-1` to `+1` (irregularly!). So, the whole subsystem worked only by accident.
This diff fixes that; now we never assume which actual values `UIFontWeight` constants have.

I will publish code style fixes as a separate diff (otherwise it will be really hard to review).

Reviewed By: JoshuaGross

Differential Revision: D15756620

fbshipit-source-id: d7f888e85815d863487c6b68a960e39fd473e095
2019-06-12 21:18:55 -07:00
..