react-native/React
Nick Lockwood 0fe074acbd Removed all calls to [UIImage imageWithData:] on a background thread
Summary: public

I had previously assumed (based on past experience and common wisdom) that `[UIImage imageWithData:]` was safe to call concurrently and/or off the main thread, but it seems that may not be the case (see https://github.com/AFNetworking/AFNetworking/pull/2815).

This diff replaces `[UIImage imageWithData:]` with ImageIO-based decoding wherever possible, and ensures that it is called on the main thread wherever that's not possible/convenient.

I've also serialized access to the `NSURLCache` inside `RCTImageLoader`, which was causing a separate-but-similar crash when loading images.

Reviewed By: fkgozali

Differential Revision: D2678369

fb-gh-sync-id: 74d033dafcf6c412556e4c96f5ac5d3432298b18
2015-11-20 05:17:33 -08:00
..
Base Removed all calls to [UIImage imageWithData:] on a background thread 2015-11-20 05:17:33 -08:00
Executors Reenable JS profiler after reload 2015-11-16 03:35:27 -08:00
Layout Fix width being ignored when has a value of 0 2015-09-25 15:42:21 -07:00
Modules Removed duplicate UIManager constants 2015-11-18 04:47:27 -08:00
Profiler Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
React.xcodeproj Open sourced RCTPasteboard 2015-11-17 15:20:32 -08:00
Views UIRefreshControl added to scroll view 2015-11-19 11:15:48 -08:00