mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 09:30:10 +08:00
Cleanup markers in getConstants
Summary: * Only add the moduleName to the outer marker * Include module init in the marker time * Include the WritableNativeArray time in CONVERT_CONSTANTS * Stop all markers from finally block in case of exception Reviewed By: kathryngray Differential Revision: D5031411 fbshipit-source-id: bf86ee3d59f2cb38866afd52e84af5699db1a003
This commit is contained in:
committed by
Facebook Github Bot
parent
2de2133014
commit
e9fc7311c4
@@ -99,7 +99,7 @@ public class ModuleHolder {
|
||||
SoftAssertions.assertCondition(mModule == null, "Creating an already created module.");
|
||||
int instanceKey = sInstanceKeyCounter.getAndIncrement();
|
||||
ReactMarker.logMarker(CREATE_MODULE_START, mName, instanceKey);
|
||||
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "createModule")
|
||||
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "ModuleHolder.createModule")
|
||||
.arg("name", mName)
|
||||
.flush();
|
||||
NativeModule module;
|
||||
@@ -118,14 +118,9 @@ public class ModuleHolder {
|
||||
}
|
||||
|
||||
private void doInitialize(NativeModule module) {
|
||||
SystraceMessage.Builder section =
|
||||
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "initialize");
|
||||
if (module instanceof CxxModuleWrapper) {
|
||||
section.arg("className", module.getClass().getSimpleName());
|
||||
} else {
|
||||
section.arg("name", mName);
|
||||
}
|
||||
section.flush();
|
||||
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "ModuleHolder.initialize")
|
||||
.arg("name", mName)
|
||||
.flush();
|
||||
ReactMarker.logMarker(ReactMarkerConstants.INITIALIZE_MODULE_START, mName);
|
||||
try {
|
||||
module.initialize();
|
||||
|
||||
Reference in New Issue
Block a user