Toby Cox 1a62b66c51 FIX #9751 - Cancelling offscreen image loads causing crashes
Summary:
This fixes https://github.com/facebook/react-native/issues/9751

We were seeing the same issues as the original reporter.

I'm not an expert on this code, so apologies if it's naive, but we haven't seen the crash since making this change.

From my understanding of it, it seems like the `cancelLoad` block was being released before the block returned by `_loadImageOrDataWithURLRequest:` was called.
This PR checks the `cancelled` flag before calling `cancelLoad()`.
Closes https://github.com/facebook/react-native/pull/10016

Differential Revision: D3902723

Pulled By: javache

fbshipit-source-id: 75cd115e28694105c6fc29469986998ca0d4cd09
2016-09-21 14:28:43 -07:00
..
2016-08-09 06:43:46 -07:00
2016-08-09 06:43:46 -07:00
2016-07-06 12:58:41 -07:00
2016-08-09 06:43:46 -07:00
2016-07-14 11:13:27 -07:00
2016-08-09 06:43:46 -07:00
2016-09-15 22:43:36 -07:00
2016-08-09 06:43:46 -07:00
2016-08-09 06:43:46 -07:00
2016-09-14 02:58:40 -07:00
2016-09-06 13:43:47 -07:00
2016-07-25 03:43:29 -07:00
2016-08-09 06:43:46 -07:00
2016-09-14 11:28:34 -07:00
2016-08-12 07:28:38 -07:00