react-native/Libraries/RCTTest/FBSnapshotTestCase
Albert Brand 420c07ef6f Add UIGraphicsPush/PopContext to prevent lost reference during snapshot testing
Summary:
We're seeing sporadic "CGContext...: invalid context 0x..." error messages during snapshot runs of our product build. This also seems to happen sometimes when building RN, see for instance: https://www.google.nl/search?q=site%3Atravis-ci.org%2Ffacebook%2Freact-native%20CGContextSaveGState%20invalid%20context

Our guess is that at some point, the CGContextRef is autoreleased. We tried retaining the ref first, but eventually settled for pushing/popping the context as it never fails in our tests (retaining still causes seemingly unrelated failures).

We're not sure if we can provide a testplan for this change, as the FBSnapshotTestController is not tested separately.
Closes https://github.com/facebook/react-native/pull/8098

Differential Revision: D3431043

fbshipit-source-id: 61b9a7a849a020f6b8671d63781eed9418d409dc
2016-06-14 09:58:41 -07:00
..
FBSnapshotTestCase.h Bugfix - Typos 2015-12-15 09:09:32 -08:00
FBSnapshotTestCase.m Second Update from Tue 24 Mar 2015-03-24 19:34:12 -07:00
FBSnapshotTestController.h Bugfix - Typos 2015-12-15 09:09:32 -08:00
FBSnapshotTestController.m Add UIGraphicsPush/PopContext to prevent lost reference during snapshot testing 2016-06-14 09:58:41 -07:00
UIImage+Compare.h Second Update from Tue 24 Mar 2015-03-24 19:34:12 -07:00
UIImage+Compare.m CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
UIImage+Diff.h Second Update from Tue 24 Mar 2015-03-24 19:34:12 -07:00
UIImage+Diff.m Second Update from Tue 24 Mar 2015-03-24 19:34:12 -07:00