react-native/Libraries/Image
Adam Comella 2aca021504 iOS: Fix dequeueTasks crash in image loader
Summary:
This fixes a crash occurring [on this line](f9f32eb426/Libraries/Image/RCTImageLoader.m (L253)). It was reported in a comment in #10433.

The problem is that `task` is deallocated at this point and is unsafe to use. Removing it from `_pendingTasks` dropped its ref count to 0. [The ARC docs](http://clang.llvm.org/docs/AutomaticReferenceCounting.html#fast-enumeration-iteration-variables) state that, by default, loop variables in fast enumeration loops are not retained. That's why `task`'s ref count is 0.

It's likely we ran into this bug because the code disobeyed the [reverseObjectEnumerator docs](https://developer.apple.com/reference/foundation/nsarray/1415734-reverseobjectenumerator) which state that "you must not modify the array during enumeration". The default retention policy for fast enumeration seems to assume you follow this.

To fix this bug and avoid other potential pitfalls, the code now follows the docs and `_pendingTa
Closes https://github.com/facebook/react-native/pull/11296

Differential Revision: D4277167

Pulled By: javache

fbshipit-source-id: 1211b32935bab7f4080dc00b88d85348786e859a
2016-12-05 10:13:29 -08:00
..
RCTImage.xcodeproj Fix imports in UIExplorerUnitTests 2016-11-24 09:58:31 -08:00
__tests__ Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
AssetRegistry.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
AssetSourceResolver.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00
Image.android.js Make resolveAssetSource public 2016-11-14 21:14:10 -08:00
Image.ios.js Improve doc code consistency 2016-11-16 18:13:26 -08:00
ImageEditor.js Auto-fix lint errors 2016-08-09 06:43:46 -07:00
ImageResizeMode.js Add Image resizeMode repeat on iOS 2016-06-22 04:28:44 -07:00
ImageSource.js Remove underline colour in Android text inputs 2016-11-04 14:58:46 -07:00
ImageSourcePropType.js RN: Stop Deep Linking `ReactPropTypes` 2016-10-14 18:59:10 -07:00
ImageStore.js Open sourced <ImageEditor>, <ImageStore> for Android 2016-01-27 10:50:54 -08:00
ImageStylePropTypes.js RN: Stop Deep Linking `ReactPropTypes` 2016-10-14 18:59:10 -07:00
RCTGIFImageDecoder.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTGIFImageDecoder.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageBlurUtils.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageBlurUtils.m Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTImageCache.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageCache.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageEditingManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageEditingManager.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageLoader.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageLoader.m iOS: Fix dequeueTasks crash in image loader 2016-12-05 10:13:29 -08:00
RCTImageStoreManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageStoreManager.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageUtils.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageUtils.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageView.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageView.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageViewManager.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageViewManager.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTLocalAssetImageLoader.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTLocalAssetImageLoader.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTResizeMode.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTResizeMode.m Add Image resizeMode center to iOS 2016-07-19 03:43:26 -07:00
RelativeImageStub.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
nativeImageSource.js Add `deprecated` flag for nativeImageSource 2016-11-28 15:58:36 -08:00
resolveAssetSource.js Introduce custom asset resolver to resolveAssetSource(..) 2016-03-15 20:20:27 -07:00