mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
3a8b988cb2
Summary: [Android] [Added] - Release underlying resources when JS instance is GC'ed on Android D15279651 introduced a crash for Oculus Twilight on Android (T45199437), so it was reverted by D15611385. This diff fixes the crash and re-applies D15279651. The problem was that ProGuard renamed BlobModule.remove() to BlobModule.release(), but the C++ code in `BlobCollector.cpp` still expected the old name. I confirmed this by looking at the Extracted Symbols file for the build which introduces the crash (https://fburl.com/mobile/ud40od3i): ``` com.facebook.react.modules.blob.BlobModule -> com.facebook.react.modules.blob.BlobModule: ... 8190:8193:void remove(java.lang.String):190:193 -> release ... ``` See the full log file here: https://fburl.com/pn02bwkb. The solution is to annotate the method with `DoNotStrip` so that ProGuard doesn't rename it. Reviewed By: mdvacca, cpojer Differential Revision: D15826082 fbshipit-source-id: f7470d394666cd34c1acae5c6ffaecc84d5ca5a3