add JS->Java Bridge traffic

Reviewed By: achen1

Differential Revision: D5740501

fbshipit-source-id: 3a88cd95d3a58aac24968e577f4eb3096d47d4ec
This commit is contained in:
Aaron Chiu
2017-09-19 11:57:08 -07:00
committed by Facebook Github Bot
parent 4fc9e20fce
commit 12f123d3e4
3 changed files with 20 additions and 8 deletions
@@ -9,17 +9,17 @@
package com.facebook.react.bridge;
import javax.annotation.Nullable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import com.facebook.infer.annotation.Assertions;
import com.facebook.systrace.SystraceMessage;
import static com.facebook.infer.annotation.Assertions.assertNotNull;
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
import com.facebook.debug.holder.PrinterHolder;
import com.facebook.debug.tags.ReactDebugOverlayTags;
import com.facebook.infer.annotation.Assertions;
import com.facebook.systrace.SystraceMessage;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import javax.annotation.Nullable;
public class JavaMethodWrapper implements NativeModule.NativeMethod {
private static abstract class ArgumentExtractor<T> {
@@ -332,6 +332,12 @@ public class JavaMethodWrapper implements NativeModule.NativeMethod {
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "callJavaModuleMethod")
.arg("method", traceName)
.flush();
PrinterHolder.getPrinter()
.logMessage(
ReactDebugOverlayTags.BRIDGE_CALLS,
"JS->Java: %s.%s()",
mModuleWrapper.getName(),
mMethod.getName());
try {
if (!mArgumentsProcessed) {
processArguments();