Fix YGNodeJobject method

Summary: We can use getCurrentEnv() , no need to pass env around methods

Reviewed By: amir-shalem

Differential Revision: D17841281

fbshipit-source-id: a4a58292e70ac05b0f0b9eb962a82a8501ad0226
This commit is contained in:
Sidharth Guglani
2019-10-10 05:31:30 -07:00
committed by Facebook Github Bot
parent 2e321fc69f
commit 8aa67abdb2

View File

@@ -25,13 +25,6 @@ static inline ScopedLocalRef<jobject> YGNodeJobject(
->ref(getCurrentEnv(), node);
}
static inline ScopedLocalRef<jobject> YGNodeJobject(
JNIEnv* env,
YGNodeRef node,
void* layoutContext) {
return reinterpret_cast<PtrJNodeMap*>(layoutContext)->ref(env, node);
}
static inline YGNodeRef _jlong2YGNodeRef(jlong addr) {
return reinterpret_cast<YGNodeRef>(static_cast<intptr_t>(addr));
}
@@ -272,7 +265,7 @@ static void YGTransferLayoutOutputsRecursive(
if (!root->getHasNewLayout()) {
return;
}
auto obj = YGNodeJobject(env, root, layoutContext);
auto obj = YGNodeJobject(root, layoutContext);
if (!obj) {
Log::log(
root,