fix: De-allocate frame HybridClass with JNI class loader if using Hermes (#455)

* De-allocate `frame` HybridClass with JNI class loader if using Hermes

See 1b3a0c2612

* Don't wrap in `#if FOR_HERMES`, other `jsi::Runtime`s might also run GC on another Thread.

* Use `jni::local_ref` for `FrameHostObject`

* Update JImageProxyHostObject.cpp

* Only run with JNI `ClassLoader` if ctor Thread ID != dtor Thread ID

* Upgrade reanimated to 2.3.0-beta.1 to fix JNI crash

* Remove `this_thread::get_id()`

* Update Podfile.lock
This commit is contained in:
Marc Rousavy
2021-09-24 16:57:12 +02:00
committed by GitHub
parent 98f58367d3
commit 60ea779ffe
8 changed files with 31 additions and 18 deletions

View File

@@ -292,7 +292,7 @@ PODS:
- React-RCTText
- RNGestureHandler (1.10.3):
- React-Core
- RNReanimated (2.3.0-alpha.3):
- RNReanimated (2.3.0-beta.1):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
@@ -328,7 +328,7 @@ PODS:
- React
- RNVectorIcons (8.1.0):
- React-Core
- VisionCamera (2.8.0):
- VisionCamera (2.8.1):
- React
- React-callinvoker
- React-Core
@@ -498,11 +498,11 @@ SPEC CHECKSUMS:
ReactCommon: eafed38eec7b591c31751bfa7494801618460459
ReactNativeNavigation: d6f27d4ba71887a161534a13e8ef3873b26c68b5
RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211
RNReanimated: 48e578538b2fad573d3d5ce2e80ad375e1534d87
RNReanimated: 13f91e6ffd60b3f50c579804958c7610de6ba9c9
RNScreens: 0591543e343c7444ea1756b6265d81a4295922c9
RNStaticSafeAreaInsets: 6103cf09647fa427186d30f67b0f5163c1ae8252
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
VisionCamera: c760f5e5207ca71962e46a7e70eef5d8d8e86ad7
VisionCamera: 1e4184f85ec6ac7b441b0266639baae7918b1396
Yoga: aa0cb45287ebe1004c02a13f279c55a95f1572f4
PODFILE CHECKSUM: 4b093c1d474775c2eac3268011e4b0b80929d3a2

View File

@@ -23,7 +23,7 @@
"react-native-gesture-handler": "^1.10.3",
"react-native-navigation": "^7.21.0",
"react-native-pressable-opacity": "^1.0.4",
"react-native-reanimated": "^2.3.0-alpha.3",
"react-native-reanimated": "^2.3.0-beta.1",
"react-native-screens": "^3.7.2",
"react-native-static-safe-area-insets": "^2.1.1",
"react-native-vector-icons": "^8.1.0",

View File

@@ -4443,10 +4443,10 @@ react-native-pressable-opacity@^1.0.4:
resolved "https://registry.yarnpkg.com/react-native-pressable-opacity/-/react-native-pressable-opacity-1.0.4.tgz#391f33fdc25cb84551f2743a25eced892b9f30f7"
integrity sha512-DBIg7UoRiuBYiFEvx+XNMqH0OEx64WrSksXhT6Kq9XuyyKsThMNDqZ9G5QV7vfu7dU2/IctwIz5c0Xwkp4K3tA==
react-native-reanimated@^2.3.0-alpha.3:
version "2.3.0-alpha.3"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.3.0-alpha.3.tgz#022f5b4eaa847304a155942165a77125c86428bc"
integrity sha512-Ln+edkTrepKUETKKmGl+GxL8RiB7awBDQFcRJIK39m5ggiLfksOAfqzclpKPLWbAfOvB4cSg+QdowzRN570FXA==
react-native-reanimated@^2.3.0-beta.1:
version "2.3.0-beta.1"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.3.0-beta.1.tgz#29deb1fe66db02b431f85b4afd5ba77d689554e6"
integrity sha512-scO945EqhQxbNox4GxY+NX0fsPNG7YheYnJTVs/u7XJ0+NuMeuSlUt9Yi89Q161hs2RpY7xAvYpQSU7PQXCeow==
dependencies:
"@babel/plugin-transform-object-assign" "^7.10.4"
invariant "^2.2.4"