Don't call jni_YGNodeFree
as fast native method
Summary: @public If `jni_YGNodeFree` is called while GC is running, the weak reference table lock is held by the GC, leading to deadlock. Here, we revert the method to being a regular native method, solving that problem. Reviewed By: SidharthGuglani Differential Revision: D14184220 fbshipit-source-id: 2882fa10586617cea2df99550a7dd8885376d11e
This commit is contained in:
committed by
Facebook Github Bot
parent
7331de78bd
commit
95169c3150
@@ -376,7 +376,7 @@ jlong jni_YGNodeClone(
|
||||
return reinterpret_cast<jlong>(clonedYogaNode);
|
||||
}
|
||||
|
||||
void jni_YGNodeFree(jlong nativePointer) {
|
||||
void jni_YGNodeFree(alias_ref<jclass>, jlong nativePointer) {
|
||||
if (nativePointer == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -728,7 +728,7 @@ jint JNI_OnLoad(JavaVM* vm, void*) {
|
||||
{
|
||||
YGMakeNativeMethod(jni_YGNodeNew),
|
||||
YGMakeNativeMethod(jni_YGNodeNewWithConfig),
|
||||
YGMakeCriticalNativeMethod(jni_YGNodeFree),
|
||||
YGMakeNativeMethod(jni_YGNodeFree),
|
||||
YGMakeCriticalNativeMethod(jni_YGNodeReset),
|
||||
YGMakeCriticalNativeMethod(jni_YGNodeClearChildren),
|
||||
YGMakeCriticalNativeMethod(jni_YGNodeInsertChild),
|
||||
|
Reference in New Issue
Block a user