Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retain cropData object in ImageEditingManager.cropImage
Summary: All struct args are passed into NativeModule methods via references. If blocks access those references, we don't move those references to the heap. This means that by the time that the block accesses the struct arg, it could be freed. This can crash the program. The solution is simple: we copy the struct arg, and access the copy in the block. This ensures that the block will make a copy, which prevents the underlying data structures from being released by the time that the block accesses the struct arg. Changelog: [iOS][Fixed] - Retain cropData struct arg in ImageEditingManager.cropImage call Differential Revision: D18076026 fbshipit-source-id: 1a7bb602606ff1afac38ad5451662c82fa86f205
- Loading branch information