Add support for context-aware logging functions

Summary:
@public

Context-aware logging functions are an internal Yoga feature that will be used for Yoga’s JNI code.

It will be possible to specify a context when calculating layout, which will be passed on to baseline and measure functions. This will be a private feature.

Reviewed By: SidharthGuglani

Differential Revision: D14123482

fbshipit-source-id: 8ba3b6c493bf79fe09831f22d2b6da44f09e3d95
This commit is contained in:
David Aurelio
2019-02-19 09:54:45 -08:00
committed by Facebook Github Bot
parent 0bdf36f5d1
commit d5ad51bccc
6 changed files with 60 additions and 13 deletions

View File

@@ -56,6 +56,7 @@ static void YGTransferLayoutOutputsRecursive(YGNodeRef root) {
Log::log(
root,
YGLogLevelError,
nullptr,
"Java YGNode was GCed during layout calculation\n");
return;
}
@@ -159,6 +160,7 @@ static void YGPrint(YGNodeRef node) {
Log::log(
node,
YGLogLevelError,
nullptr,
"Java YGNode was GCed during layout calculation\n");
}
}
@@ -245,6 +247,7 @@ static YGSize YGJNIMeasureFunc(
Log::log(
node,
YGLogLevelError,
nullptr,
"Java YGNode was GCed during layout calculation\n");
return YGSize{
widthMode == YGMeasureModeUndefined ? 0 : width,