move the module creation out of the constants creation systrace

Reviewed By: achen1

Differential Revision: D4555801

fbshipit-source-id: 5ee338a686bca33f0a480bd6b428a44f626620d1
This commit is contained in:
Aaron Chiu 2017-02-13 19:26:02 -08:00 committed by Facebook Github Bot
parent 91bda43e56
commit 78801793f3
1 changed files with 1 additions and 1 deletions

View File

@ -98,11 +98,11 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
// NativeMap out of OnLoad.
@DoNotStrip
public NativeArray getConstants() {
BaseJavaModule baseJavaModule = getModule();
ReactMarker.logMarker(GET_CONSTANTS_START, getName());
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "Map constants")
.arg("moduleName", getName())
.flush();
BaseJavaModule baseJavaModule = getModule();
Map<String, Object> map = baseJavaModule.getConstants();
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);