react-native/Libraries
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
..
ART
ActionSheetIOS Added Subject to ActionSheetIOS share options and updated example 2015-11-19 08:42:31 -08:00
AdSupport
Animated Fixed Typo 2015-11-18 08:10:30 -08:00
AppRegistry
AppStateIOS
BatchedBridge
CameraRoll
Components Use requireNativeComponent in View.js. 2015-11-20 02:09:38 -08:00
CustomComponents
DebugComponentHierarchy
Device
Devtools
Fetch
Geolocation Open source the Android Location module 2015-11-18 10:15:21 -08:00
Image Removed all calls to [UIImage imageWithData:] on a background thread 2015-11-20 05:17:33 -08:00
Inspector
Interaction
JavaScriptAppEngine Split immediate into multiple passes 2015-11-19 03:33:26 -08:00
LayoutAnimation
LinkingIOS
Modal
NativeApp
Network ensure that RCTNetworking JS function names are consistent with android 2015-11-18 15:48:29 -08:00
Picker Compose propTypes from View.propTypes where appropriate. 2015-11-18 13:06:27 -08:00
Portal
PushNotificationIOS
QuickPerformanceLogger
RCTTest Compose propTypes from View.propTypes where appropriate. 2015-11-18 13:06:27 -08:00
RKBackendNode
ReactIOS Use requireNativeComponent in View.js. 2015-11-20 02:09:38 -08:00
ReactNative
Sample
Settings
Storage
StyleSheet
Text
Utilities Removed duplicate UIManager constants 2015-11-18 04:47:27 -08:00
Vibration
WebSocket
react-native
vendor
Promise.js