Fix systrace use in OSS

Reviewed By: bestander

Differential Revision: D2799222

fb-gh-sync-id: 8002c7f94eedffdf05bb134ced14809a78757bb0
This commit is contained in:
Mike Armstrong 2016-01-04 05:12:08 -08:00 committed by facebook-github-bot-1
parent 52220a96f9
commit 40d9918f5d
1 changed files with 4 additions and 0 deletions

View File

@ -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());
}