From 40d9918f5def8e68f8f07f1e0a791972ad1e0f6b Mon Sep 17 00:00:00 2001 From: Mike Armstrong Date: Mon, 4 Jan 2016 05:12:08 -0800 Subject: [PATCH] Fix systrace use in OSS Reviewed By: bestander Differential Revision: D2799222 fb-gh-sync-id: 8002c7f94eedffdf05bb134ced14809a78757bb0 --- ReactAndroid/src/main/jni/react/jni/OnLoad.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp index e4368d682..5ef5c28aa 100644 --- a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +++ b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp @@ -562,9 +562,13 @@ static void makeJavaCall(JNIEnv* env, jobject callback, MethodCall&& call) { if (call.arguments.isNull()) { return; } + + #ifdef WITH_FBSYSTRACE if (call.callId != -1) { fbsystrace_end_async_flow(TRACE_TAG_REACT_APPS, "native", call.callId); } + #endif + auto newArray = ReadableNativeArray::newObjectCxxArgs(std::move(call.arguments)); env->CallVoidMethod(callback, gCallbackMethod, call.moduleId, call.methodId, newArray.get()); }