From 4b15eb53ece845f30d0c12479e44f2159febe4c0 Mon Sep 17 00:00:00 2001 From: Ram N Date: Thu, 6 Sep 2018 21:22:17 -0700 Subject: [PATCH] Fix broken systrace message markers Summary: SystraceMessage needs to have a flush method Reviewed By: shergin Differential Revision: D9696709 fbshipit-source-id: 7f8c9422fbc2e3ca8c184015889a4d1aa1500a7c --- .../main/java/com/facebook/react/ReactInstanceManager.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java index 338fa8713..53fac5f1e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java @@ -804,8 +804,7 @@ public class ReactInstanceManager { synchronized (mPackages) { Set uniqueNames = new HashSet<>(); for (ReactPackage reactPackage : mPackages) { - SystraceMessage.beginSection( - Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "ReactInstanceManager.getViewManagerName") + SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "ReactInstanceManager.getViewManagerName") .arg("Package", reactPackage.getClass().getSimpleName()) .flush(); if (reactPackage instanceof ViewManagerOnDemandReactPackage) { @@ -815,7 +814,7 @@ public class ReactInstanceManager { uniqueNames.addAll(names); } } - Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE); + SystraceMessage.endSection(TRACE_TAG_REACT_JAVA_BRIDGE).flush(); } Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE); return new ArrayList<>(uniqueNames); @@ -1194,6 +1193,6 @@ public class ReactInstanceManager { if (reactPackage instanceof ReactPackageLogger) { ((ReactPackageLogger) reactPackage).endProcessPackage(); } - SystraceMessage.endSection(TRACE_TAG_REACT_JAVA_BRIDGE); + SystraceMessage.endSection(TRACE_TAG_REACT_JAVA_BRIDGE).flush(); } }