Allow to use JNI without global refs

Summary:
@public

Adds the ability to opt into avoiding global weak JNI refs via `YogaConfig`.

Note that only homogeneous trees are supported, i.e. **mixing weak-ref and non-weak-ref nodes will break!**

Not using JNI refs hopefully will help with avoiding JNI reference table overflows, and will help creating trees on multiple threads, as no lock has to be acquired at any time.

Reviewed By: SidharthGuglani

Differential Revision: D14151037

fbshipit-source-id: 56d94713d39aee080d54be4cb4cdf5e3eccb473a
This commit is contained in:
David Aurelio
2019-02-21 05:35:51 -08:00
committed by Facebook Github Bot
parent dcd9438488
commit 05f36a835a
3 changed files with 129 additions and 43 deletions

View File

@@ -10,7 +10,7 @@
#include "Yoga.h"
struct YGConfig {
using LogWithContextFn = void (*)(
using LogWithContextFn = int (*)(
YGConfigRef config,
YGNodeRef node,
YGLogLevel level,