react-native/React
Valentin Shergin e7c6a4c038 Fixed crash caused by NaN values in RCTTouchEvent
Summary:
React Native uses JSON to marshal the data across the bridge.
And because of this we have to avoid using NaN and INF values in events and other pieces of data that suppose to be transfered to/from JS side.
(We also don't want to introduce additional wrapping/escaping semantics for perfomance reasons.)
So, we have to gate all particular cases where there is a possibility of NaN or INF values, and replace these value with something meaningful for each particular case.
We are using `0` as NaN substitution here because:
 * NaN in touch event is super rare case;
 * Conversion to `0` is fast;
 * `0` is okay value for product code in most cases;
 * In all cases `0` is decent analog to "undefined position on screen" for touch event;
 * Nobody will explicitly handle NaN case in product code, just because it is super rare case and actually indicates that something else went wrong.

Reviewed By: javache

Differential Revision: D4918669

fbshipit-source-id: e95fa29e59dcdc40b57519e307b74c1f293da188
2017-04-21 11:30:57 -07:00
..
Base Fixed crash caused by NaN values in RCTTouchEvent 2017-04-21 11:30:57 -07:00
CxxBridge More verbose error messages for iOS 2017-04-18 14:19:13 -07:00
CxxModule Add extra guards to DispatchMessageQueueThread 2017-04-11 12:25:39 -07:00
CxxUtils Explicitly cast to (bool) where needed on objc with folly::dynamic 2017-04-18 15:36:20 -07:00
DevSupport Split off websocket related items to RCTPackagerConnection 2017-04-20 08:32:10 -07:00
Executors Remove RCTBatchedBridge rule and all uses from the tree 2017-04-19 17:00:43 -07:00
Modules Immediately trigger renderApplication from RCTRootView init 2017-04-21 07:04:57 -07:00
Profiler Fixing another iOS app extension unsafe API usage in react native 2017-04-06 12:30:55 -07:00
React.xcodeproj Split off websocket related items to RCTPackagerConnection 2017-04-20 08:32:10 -07:00
ReactCxx.xcodeproj Split off websocket related items to RCTPackagerConnection 2017-04-20 08:32:10 -07:00
Views `reactRespondsToTouch:` was removed 2017-04-10 12:32:31 -07:00
folly.xcconfig Update Boost dependency to 1.63 on iOS 2017-03-10 05:45:28 -08:00